Skip to content

Commit ceab518

Browse files
committed
Add directory_save parameter to WandB initialization for output directory configuration
1 parent 8c6f444 commit ceab518

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/wandb_script_wrapper.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
55
This script is intended to serve as a wrapper to execute an existing target Python script
66
without any modifications, while capturing its standard output, standard error, and system
7-
metrics (CPU, memory, and GPU) with Weights & Biases (WandB). It leverages WandBs
7+
metrics (CPU, memory, and GPU) with Weights & Biases (WandB). It leverages WandB's
88
built-in GPU monitoring (via monitor_gpus=True) to automatically capture GPU metrics, and
99
streams subprocess output (stdout and stderr) to the WandB dashboard in real time.
1010
@@ -153,6 +153,7 @@ def monitor_system_metrics(interval: int = 30):
153153
sys.exit(1)
154154

155155
# Initialize WandB using the provided kwargs. Use 'period_logger' (if provided) to set the stats sampling interval.
156+
kwargs_wandb_init['dir'] = directory_save
156157
wandb.init(
157158
settings=wandb.Settings(x_stats_sampling_interval=params_wrapper.get('period_logger', 30)),
158159
**kwargs_wandb_init

0 commit comments

Comments
 (0)