fix: provide TensorBoard logging dir in finetuning script#295
Open
ElhamDevelopmentStudio wants to merge 1 commit into
Open
fix: provide TensorBoard logging dir in finetuning script#295ElhamDevelopmentStudio wants to merge 1 commit into
ElhamDevelopmentStudio wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix the TensorBoard logging crash in
finetuning/sft_12hz.pyby providing Accelerate with a valid log directory.Fixes #286
Problem
The fine-tuning script initializes Accelerate like this:
With
accelerate==1.12.0, this raises:That causes
sft_12hz.pyto fail before training starts.Changes
--logging_dirlogging_dirto<output_model_path>/logswhen not providedAcceleratorAccelerator(..., project_dir=logging_dir)Why This Approach
Example
Existing command still works:
TensorBoard logs will now default to:
Optional custom path:
Validation
Validated in a clean temporary environment with
accelerate==1.12.0andtensorboard:ValueErrorwithoutproject_dirAccelerator(..., project_dir=...)succeedssft_12hz.pygets past Accelerator initializationpython -m py_compile finetuning/sft_12hz.py