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 6f2134d commit 7ff1ce9Copy full SHA for 7ff1ce9
tuning/trainercontroller/callback.py
@@ -585,6 +585,16 @@ def on_save(
585
kwargs["path"] = f"{args.output_dir}/checkpoint-{state.global_step}"
586
if "is_final" not in kwargs:
587
kwargs["is_final"] = False
588
+
589
+ base_path = kwargs["path"]
590
+ hf_converted_path = os.path.join(base_path, "hf_converted_checkpoint")
591
592
+ if os.path.isdir(hf_converted_path):
593
+ kwargs["path"] = hf_converted_path
594
+ kwargs["hf_path"] = hf_converted_path
595
+ else:
596
+ kwargs["hf_path"] = base_path
597
598
self._actions_on_event(event_name="on_save", **kwargs)
599
600
def on_step_begin(
0 commit comments