mirror of https://github.com/razor-ai/soup.git
fix: guard _output_dir in PretrainTrainerWrapper.train()
Prevent silent failure if setup() partially completes by checking both self.trainer and self._output_dir before proceeding. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
15a6daf342
commit
4d34924d8f
|
|
@ -263,7 +263,7 @@ class PretrainTrainerWrapper:
|
|||
resume_from_checkpoint: Optional[str] = None,
|
||||
) -> dict:
|
||||
"""Run continued pre-training and return results summary."""
|
||||
if self.trainer is None:
|
||||
if self.trainer is None or self._output_dir is None:
|
||||
raise RuntimeError(
|
||||
"PretrainTrainerWrapper.train() called before setup(). "
|
||||
"Call setup(dataset) first."
|
||||
|
|
|
|||
Loading…
Reference in New Issue