mirror of
https://github.com/NousResearch/atropos.git
synced 2026-04-30 17:40:36 +00:00
Merge pull request #202 from Myashka/main
Include run name in wandb initialization in BaseEnv
This commit is contained in:
commit
3b8d8a6f09
1 changed files with 17 additions and 6 deletions
|
|
@ -400,10 +400,21 @@ class BaseEnv(ABC):
|
||||||
data = await parse_http_response(resp, logger)
|
data = await parse_http_response(resp, logger)
|
||||||
self.wandb_group = data["group"]
|
self.wandb_group = data["group"]
|
||||||
self.wandb_project = data["project"]
|
self.wandb_project = data["project"]
|
||||||
|
|
||||||
if self.wandb_project is None:
|
if self.wandb_project is None:
|
||||||
await asyncio.sleep(1)
|
await asyncio.sleep(1)
|
||||||
else:
|
continue
|
||||||
|
|
||||||
|
wandb_run_name = None
|
||||||
|
if self.config.wandb_name:
|
||||||
|
random_id = "".join(random.choices(string.ascii_lowercase, k=6))
|
||||||
|
current_date = datetime.now().strftime("%Y-%m-%d")
|
||||||
|
wandb_run_name = (
|
||||||
|
f"{self.config.wandb_name}-{current_date}-{random_id}"
|
||||||
|
)
|
||||||
|
|
||||||
wandb.init(
|
wandb.init(
|
||||||
|
name=wandb_run_name,
|
||||||
project=self.wandb_project,
|
project=self.wandb_project,
|
||||||
group=self.wandb_group,
|
group=self.wandb_group,
|
||||||
config=self.config.model_dump(),
|
config=self.config.model_dump(),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue