-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Fix for 'upload_to_hf_hub()' path mismatch with 'save()' #3977
Merged
alexsherstinsky
merged 16 commits into
ludwig-ai:master
from
sanjaydasgupta:upload-hf-issue-3925
Mar 24, 2024
Merged
Changes from 6 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
a4b9b3d
fix for 'upload_to_hf_hub()' path mismatch with 'save()'
sanjaydasgupta 2f80119
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] e11a52c
added one unit test 'test_upload_to_hf_hub__validate_upload_parameters2'
sanjaydasgupta b9f3819
Merge remote-tracking branch 'origin/upload-hf-issue-3925' into uploa…
sanjaydasgupta 7257808
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] f749c0c
passed additional argument 'model_path_is_experiment_path=False' to '…
sanjaydasgupta 5c58b4c
always normalize any user-provided path to the experiment-path, modif…
sanjaydasgupta fa92d13
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] c56c42f
The unit test added earlier is no longer correct or relevant
sanjaydasgupta a62b1f4
Merge remote-tracking branch 'origin/upload-hf-issue-3925' into uploa…
sanjaydasgupta 8cea3e2
minor docstring edit - just to kick off CI
sanjaydasgupta c68132e
updated the docstrings for 'model_weight' and other minor code changes
sanjaydasgupta 8b072d2
used global literals 'MODEL_FILE_NAME' and 'MODEL_WEIGHTS_FILE_NAME' …
sanjaydasgupta c632b52
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 43656be
Merge branch 'ludwig-ai:master' into upload-hf-issue-3925
sanjaydasgupta aa1750e
fixed a few formatting errors within docstrings
sanjaydasgupta File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
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.
@sanjaydasgupta The idea/direction seems great! I just have a couple of minor suggestions for you to consider (because if they work, they might improve the code quality slightly):
"model"
and"model_weights"
and replace codebase-wise?model_path_is_experiment_path
, determine the "experiments" directory and standardize all methods on using it -- so the "experiment" directory would be passed to them. I think that even if a function is passed the "model" directory, and in those cases we have to make the assumption that "experiments" is "model/..", this would still be reasonable and acceptable. What do you think?Thank you very much!
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.
@alexsherstinsky, responding to your (2) above - sounds like a great idea! Let me take a closer look at the code.
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.
Hi @alexsherstinsky, both your suggestions have been implemented.
There was already a label
MODEL_WEIGHTS_FILE_NAME
defined (and used in some places) for the literal string "model_weights". So the choice of a label for "model" fell naturally onMODEL_FILE_NAME
-- not the best, but there it is for the time being.