Skip to content

Commit

Permalink
fix: crash when output directory doesn't exist (foundation-model-stac…
Browse files Browse the repository at this point in the history
…k#364)

Signed-off-by: Harikrishnan Balagopal <[email protected]>
  • Loading branch information
HarikrishnanBalagopal authored Oct 4, 2024
1 parent 7b97e9e commit 63d0c5d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tuning/sft_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -637,6 +637,9 @@ def main():
combined_tracker_configs.file_logger_config = file_logger_config
combined_tracker_configs.aim_config = aim_config

if training_args.output_dir:
os.makedirs(training_args.output_dir, exist_ok=True)
logger.info("using the output directory at %s", training_args.output_dir)
try:
trainer, additional_train_info = train(
model_args=model_args,
Expand Down

0 comments on commit 63d0c5d

Please sign in to comment.