We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e2cc537 commit 7e11ac4Copy full SHA for 7e11ac4
src/accelerate/tracking.py
@@ -340,7 +340,16 @@ def store_init_configuration(self, values: dict):
340
"""
341
import wandb
342
343
- wandb.config.update(values, allow_val_change=True)
+ if os.environ.get("WANDB_MODE") == "offline":
344
+ # In offline mode, restart wandb with config included
345
+ if hasattr(self, "run") and self.run:
346
+ self.run.finish()
347
+
348
+ init_kwargs = self.init_kwargs.copy()
349
+ init_kwargs["config"] = values
350
+ self.run = wandb.init(project=self.run_name, **init_kwargs)
351
+ else:
352
+ wandb.config.update(values, allow_val_change=True)
353
logger.debug("Stored initial configuration hyperparameters to WandB")
354
355
@on_main_process
0 commit comments