Skip to content

Commit 55ecdb0

Browse files
committed
fix requirements.txt and wandb log params
1 parent 10eb6b4 commit 55ecdb0

File tree

2 files changed

+23
-2
lines changed

2 files changed

+23
-2
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
absl-py
2+
emoji
3+
immutabledict
4+
langdetect
5+
nltk
6+
numpy==1.26.4
7+
spacy
8+
syllapy
9+
unicodedata2

slime/utils/wandb_utils.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
11
import os
2+
from typing import Any
3+
24
import wandb
35

46

7+
def _build_wandb_config(args) -> dict[str, Any]:
8+
config = args.__dict__
9+
if args.eval_datasets:
10+
for dataset_config in args.eval_datasets:
11+
name = dataset_config.name
12+
for key, value in dataset_config.__dict__.items():
13+
config[f"eval_{name}_{key}"] = value
14+
return config
15+
16+
517
def _is_offline_mode(args) -> bool:
618
"""Detect whether W&B should run in offline mode.
719
@@ -49,7 +61,7 @@ def init_wandb_primary(args):
4961
"project": args.wandb_project,
5062
"group": group,
5163
"name": run_name,
52-
"config": args.__dict__,
64+
"config": _build_wandb_config(args),
5365
}
5466

5567
# Configure settings based on offline/online mode
@@ -111,7 +123,7 @@ def init_wandb_secondary(args, wandb_run_id, router_addr=None):
111123
"id": wandb_run_id,
112124
"entity": args.wandb_team,
113125
"project": args.wandb_project,
114-
"config": args.__dict__,
126+
"config": _build_wandb_config(args),
115127
"resume": "allow",
116128
"reinit": True,
117129
"settings": wandb.Settings(**settings_kwargs),

0 commit comments

Comments
 (0)