Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TensorBoardTracker: wrong arg def #1111

Merged
merged 1 commit into from
Feb 25, 2023
Merged

TensorBoardTracker: wrong arg def #1111

merged 1 commit into from
Feb 25, 2023

Conversation

stas00
Copy link
Contributor

@stas00 stas00 commented Feb 25, 2023

there is a small bug here:

$ python -c "import accelerate.tracking; x = accelerate.tracking.TensorBoardTracker('1')"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/mnt/nvme0/code/huggingface/accelerate-master/src/accelerate/tracking.py", line 155, in __init__
    self.logging_dir = os.path.join(logging_dir, run_name)
  File "/home/stas/anaconda3/envs/py38-pt113/lib/python3.8/posixpath.py", line 76, in join
    a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not NoneType

So the logging_dir arg can't be Optional, which this PR fixes, with it:

$ python -c "import accelerate.tracking; x = accelerate.tracking.TensorBoardTracker('1')"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/mnt/nvme0/code/huggingface/accelerate-master/src/accelerate/tracking.py", line 83, in execute_on_main_process
    return PartialState().on_main_process(function)(self, *args, **kwargs)
TypeError: __init__() missing 1 required positional argument: 'logging_dir'

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Feb 25, 2023

The documentation is not available anymore as the PR was closed or merged.

@muellerzr
Copy link
Collaborator

Thanks for catching!

@stas00 stas00 merged commit 907a86d into main Feb 25, 2023
@stas00 stas00 deleted the fix-log-dir branch February 25, 2023 08:57
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.

None yet

3 participants