- 
                Notifications
    You must be signed in to change notification settings 
- Fork 31k
Save TB logs as part of push_to_hub #27022
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
Conversation
| The documentation is not available anymore as the PR was closed or merged. | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Could you link to the PR that removed it ? (and maybe add a test!)
| Thanks @ArthurZucker, done (and added a test!) | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM thanks for iterating!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @muellerzr
cc @Wauplin if you have time to give it a quick look
| Thanks for the ping @LysandreJik! I'm currently reviewing it. Most probably good but I want to make a few tests first with the blob patterns (I found them a bit un-intuitive TBH). Will update soon :) | 
| @muellerzr Unfortunately,  Especially: 
 
 I've tried to define a good set of  EDIT: just realized that  | 
| (here is my test script if you want to play with it. At first I thought it would be better to include any  from fnmatch import fnmatch
paths = [
    "readme.md",
    "subfolder/readme.md",
    "folder/readme.md",
    "_private.json",
    "subfolder/_private.json",
    "foo.tfevents.bar",
    "subfolder/foo.tfevents.bar",
    "runs/subfolder/foo.tfevents.bar",
    "not/subfolder/foo.tfevents.bar",
]
# allow_patterns = ["*.tfevents.*", "*[!\]*"]
allow_patterns = ["*"]
ignore_patterns = ["_*", "[!r]*/*", "?[!u]*/*", "??[!n]*/*", "???[!s]*/*"]
# pattern = '**/*[!tfevents]*'
# pattern = '[!runs]**/*'
def is_included(path):
    if any(fnmatch(path, r) for r in ignore_patterns):
        return False
    if any(fnmatch(path, r) for r in allow_patterns):
        return True
    return False
for path in paths:
    print(f"{path:<40}", is_included(path))) | 
| Actually looking back at the implementation before #25095, do we really need to exclude every folder -so the current  I already thought about the fact that we should respect the  | 
| 
 Or maybe server-side support (in case the .gitignore is uploaded first, of course). I don't know if it's the case server-side already or not, to be honest. | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! Thanks for making the changes @muellerzr 👍
* Support runs/ * Upload runs folder as part of push to hub * Add a test * Add to test deps * Update with proposed solution from Slack * Ensure that repo gets deleted in tests

What does this PR do?
This PR brings back the default capability of pushing tensorboard logs as part of
.push_to_hub()by modifying theglobexclusion filter to specifically ignore intermediate checkpoints.You can see an example here where logs were successfully uploaded: https://huggingface.co/muellerzr/sequence_classification/tree/main
Was removed in #25095, likely because we didn't think about the fact that users would want to push their logs with tensorboard
Fixes # (issue)
fixes #26321
Before submitting
Pull Request section?
to it if that's the case.
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.
@ArthurZucker @LysandreJik