Skip to content

Commit 4b8f63d

Browse files
committed
added return 0 at the end of __call__ function for hydra.
1 parent 32b9318 commit 4b8f63d

File tree

1 file changed

+3
-1
lines changed
  • templates/src/llm/finetune_distributed

1 file changed

+3
-1
lines changed

templates/src/llm/finetune_distributed/train.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ def _build_training_arguments(
210210

211211
return TrainingArguments(**kwargs)
212212

213-
def __call__(self, cfg: DictConfig):
213+
def __call__(self, cfg: DictConfig) -> int:
214214
"""Execute fine-tuning, handling checkpoints, training, and evaluation."""
215215
out_dir = Path(cfg.paths.out_dir)
216216
out_dir.mkdir(parents=True, exist_ok=True)
@@ -277,6 +277,8 @@ def __call__(self, cfg: DictConfig):
277277
"All done. Train metrics: %s Eval metrics: %s", metrics, eval_metrics
278278
)
279279

280+
return 0
281+
280282
def checkpoint(
281283
self, *args: Any, **kwargs: Any
282284
) -> submitit.helpers.DelayedSubmission:

0 commit comments

Comments
 (0)