Co-authored-by: Ashis Ghosh <ahsisghosh@live.com> Co-authored-by: Simon Alibert <75076266+aliberts@users.noreply.github.com>
This commit is contained in:
parent
29a196c5dd
commit
fc5cf3d84a
|
@ -82,9 +82,9 @@ class Logger:
|
||||||
# Also save the full Hydra config for the env configuration.
|
# Also save the full Hydra config for the env configuration.
|
||||||
OmegaConf.save(self._cfg, save_dir / "config.yaml")
|
OmegaConf.save(self._cfg, save_dir / "config.yaml")
|
||||||
if self._wandb and not self._disable_wandb_artifact:
|
if self._wandb and not self._disable_wandb_artifact:
|
||||||
# note wandb artifact does not accept ":" in its name
|
# note wandb artifact does not accept ":" or "/" in its name
|
||||||
artifact = self._wandb.Artifact(
|
artifact = self._wandb.Artifact(
|
||||||
self._group.replace(":", "_") + "-" + str(self._seed) + "-" + str(identifier),
|
f"{self._group.replace(':', '_').replace('/', '_')}-{self._seed}-{identifier}",
|
||||||
type="model",
|
type="model",
|
||||||
)
|
)
|
||||||
artifact.add_file(save_dir / SAFETENSORS_SINGLE_FILE)
|
artifact.add_file(save_dir / SAFETENSORS_SINGLE_FILE)
|
||||||
|
@ -94,9 +94,10 @@ class Logger:
|
||||||
self._buffer_dir.mkdir(parents=True, exist_ok=True)
|
self._buffer_dir.mkdir(parents=True, exist_ok=True)
|
||||||
fp = self._buffer_dir / f"{str(identifier)}.pkl"
|
fp = self._buffer_dir / f"{str(identifier)}.pkl"
|
||||||
buffer.save(fp)
|
buffer.save(fp)
|
||||||
if self._wandb:
|
if self._wandb and not self._disable_wandb_artifact:
|
||||||
|
# note wandb artifact does not accept ":" or "/" in its name
|
||||||
artifact = self._wandb.Artifact(
|
artifact = self._wandb.Artifact(
|
||||||
self._group + "-" + str(self._seed) + "-" + str(identifier),
|
f"{self._group.replace(':', '_').replace('/', '_')}-{self._seed}-{identifier}",
|
||||||
type="buffer",
|
type="buffer",
|
||||||
)
|
)
|
||||||
artifact.add_file(fp)
|
artifact.add_file(fp)
|
||||||
|
|
Loading…
Reference in New Issue