mirror of
https://github.com/NousResearch/atropos.git
synced 2026-04-19 12:57:58 +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,15 +400,26 @@ class BaseEnv(ABC):
|
|||
data = await parse_http_response(resp, logger)
|
||||
self.wandb_group = data["group"]
|
||||
self.wandb_project = data["project"]
|
||||
|
||||
if self.wandb_project is None:
|
||||
await asyncio.sleep(1)
|
||||
else:
|
||||
wandb.init(
|
||||
project=self.wandb_project,
|
||||
group=self.wandb_group,
|
||||
config=self.config.model_dump(),
|
||||
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}"
|
||||
)
|
||||
break
|
||||
|
||||
wandb.init(
|
||||
name=wandb_run_name,
|
||||
project=self.wandb_project,
|
||||
group=self.wandb_group,
|
||||
config=self.config.model_dump(),
|
||||
)
|
||||
break
|
||||
|
||||
@retry(
|
||||
stop=stop_after_attempt(3),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue