Skip to content

fix: create results_dir if missing before saving results#2576

Merged
rwightman merged 1 commit intohuggingface:mainfrom
zhima771:fix/missing-results-dir
Sep 4, 2025
Merged

fix: create results_dir if missing before saving results#2576
rwightman merged 1 commit intohuggingface:mainfrom
zhima771:fix/missing-results-dir

Conversation

@zhima771
Copy link
Copy Markdown
Contributor

Problem:

  • The inference script crashes when saving results if the specified results_dir does not exist.

Solution:

  • Automatically create results_dir if it doesn't exist using os.makedirs.
  • Ensures results are saved successfully without manual directory creation.

Test:

  • Verified local inference runs and results are correctly saved to a new directory.

@rwightman rwightman merged commit 6d30b82 into huggingface:main Sep 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants