Spaces:
Running
Running
feat: remove cache before creating artifacts
Browse files
dev/seq2seq/run_seq2seq_flax.py
CHANGED
@@ -927,6 +927,10 @@ def main():
|
|
927 |
|
928 |
# save to W&B
|
929 |
if data_args.log_model:
|
|
|
|
|
|
|
|
|
930 |
metadata = {"step": step, "epoch": epoch}
|
931 |
if eval_metrics is not None:
|
932 |
metadata["eval/loss"] = eval_metrics["loss"]
|
@@ -954,9 +958,6 @@ def main():
|
|
954 |
artifact.add_file(
|
955 |
str(Path(training_args.output_dir) / "training_state.json")
|
956 |
)
|
957 |
-
# save some space
|
958 |
-
c = wandb.wandb_sdk.wandb_artifacts.get_artifacts_cache()
|
959 |
-
c.cleanup("5GB")
|
960 |
|
961 |
wandb.run.log_artifact(artifact)
|
962 |
|
|
|
927 |
|
928 |
# save to W&B
|
929 |
if data_args.log_model:
|
930 |
+
# save some space
|
931 |
+
c = wandb.wandb_sdk.wandb_artifacts.get_artifacts_cache()
|
932 |
+
c.cleanup(wandb.util.from_human_size("5GB"))
|
933 |
+
|
934 |
metadata = {"step": step, "epoch": epoch}
|
935 |
if eval_metrics is not None:
|
936 |
metadata["eval/loss"] = eval_metrics["loss"]
|
|
|
958 |
artifact.add_file(
|
959 |
str(Path(training_args.output_dir) / "training_state.json")
|
960 |
)
|
|
|
|
|
|
|
961 |
|
962 |
wandb.run.log_artifact(artifact)
|
963 |
|