Update SaveAxolotlConfigtoWandBCallback to use artifact instead of save (#1483)
* deprecated wandb.save * also use wandb.save for axolotl yaml * chore: lint --------- Co-authored-by: Wing Lian <wing.lian@gmail.com>
This commit is contained in:
@@ -761,6 +761,11 @@ class SaveAxolotlConfigtoWandBCallback(TrainerCallback):
|
|||||||
mode="w", delete=False, suffix=".yml", prefix="axolotl_config_"
|
mode="w", delete=False, suffix=".yml", prefix="axolotl_config_"
|
||||||
) as temp_file:
|
) as temp_file:
|
||||||
copyfile(self.axolotl_config_path, temp_file.name)
|
copyfile(self.axolotl_config_path, temp_file.name)
|
||||||
|
artifact = wandb.Artifact(
|
||||||
|
f"config-{wandb.run.id}", type="axolotl-config"
|
||||||
|
)
|
||||||
|
artifact.add_file(temp_file.name)
|
||||||
|
wandb.log_artifact(artifact)
|
||||||
wandb.save(temp_file.name)
|
wandb.save(temp_file.name)
|
||||||
LOG.info(
|
LOG.info(
|
||||||
"The Axolotl config has been saved to the WandB run under files."
|
"The Axolotl config has been saved to the WandB run under files."
|
||||||
|
|||||||
Reference in New Issue
Block a user