-
Notifications
You must be signed in to change notification settings - Fork 487
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
Add fastai upstream and downstream capacities for fastai>=2.4 and fastcore>=1.3.27 versions #678
Merged
Merged
Changes from 56 commits
Commits
Show all changes
87 commits
Select commit
Hold shift + click to select a range
f237986
added a fastai mixin for upstream and downstream tasks with fastai l…
omarespejel 16a10a2
Added check for right fastai version
omarespejel a0398d9
Added aditional documentation
omarespejel 0e65896
Add support for fastai>=2.4 versions and fastcore>=1.3.27
omarespejel aea8b8e
Merge branch 'main' into add-fastai-mixin
omarespejel 940c68d
Update docstrings, save_fastai_learner, push_to_hub_fastai, and chang…
omarespejel 4b246f4
Merge branch 'add-fastai-mixin' of https://github.com/omarespejel/hug…
omarespejel 807e7bb
trim triling whitespaces
omarespejel 44493cf
Import fastai_utils.py in huggingface_hub/__init__py
omarespejel a7253ed
Add check_fastai_fastcore_versions function in fastai_utils.py
omarespejel 5904986
Eliminate imports of libraries not used in fastai_utils.py
omarespejel 18b4498
Add isort and black format to fastai_utils.py
omarespejel 37b6b51
Change pickle_protocol argument from kwargs to explicit
omarespejel 1c9cff5
Change kwargs arguments in the function from_pretrained_fastai to exp…
omarespejel 2a40a8d
Simplify push_to_hub_fastai function, particularly the repo_id argument
omarespejel 1a4012c
Eliminate search for a pickle document in from_pretrained_fastai func…
omarespejel a9ba5d2
Simplify push_to_hub_fastai and correct bug in from_pretrained_fastai
omarespejel 68f2006
Add pickle.DEFAULT_PROTOCOL for get adequate protocol when exporting …
omarespejel 97742cb
Allow to load only models in the Hub when using from_pretrained_fastai
omarespejel 7ba1fdd
Eliminate cache_dir from from_pretrained_fastai for simplification
omarespejel bf7a033
Correct nit picks in push_to_hub_fastai
omarespejel d3da12a
Update with nits
omarespejel 3a66991
Apply isort
omarespejel 679187c
Replace config.json for pyproject.toml to check for fastai and fastco…
omarespejel 24d3ddb
Isort imports
omarespejel b0eeb35
Make pyproject.toml automatically filled with fastai, fastcore, and p…
omarespejel 2fb9400
add check_fastai_fastcore_pyproject_versions function to know the fas…
omarespejel c443bb8
Change library tomlkit for toml
omarespejel 42b01c3
Add extras[fastai] with the toml library
omarespejel fb886e9
Change the way the token is asked in def push_to_hub_fastai(
omarespejel effac9f
Eliminate logger from imports
omarespejel db1cbe9
Fix nits
omarespejel c9ccff0
Remove typing.Union from imports
omarespejel 19fad26
add fastai integration tests
omarespejel f72ac27
Import fastai in setup.py
omarespejel fd63e5a
Import toml inside check_fastai_fastcore_pyproject_versions function
omarespejel 1435d2c
Merge branch 'main' of https://github.com/huggingface/huggingface_hub…
omarespejel 2ee4c56
Merge branch 'huggingface:main' into add-fastai-mixin
omarespejel bd1c675
Merge branch 'add-fastai-mixin' of https://github.com/omarespejel/hug…
omarespejel 2c38e7b
Nits in fastai_utils.py
omarespejel 4013c79
Add build_fastai to python-tests.yml
omarespejel 5e840b9
Add fastcore import to setup.py
omarespejel 33061cb
Add require_fastai_fastcore() to skip tests
omarespejel 6680065
Nits and documentation of raised errors improved
omarespejel 8ce5894
Merge main branch changes
988d6cd
add strategy for fastai in python-tests.yml
d3585a3
Eliminate organization from push_to_hub_fastai
5699b43
Add python 3.7-3.10 to python-tests.yml
omarespejel 8041b60
Resolve conflicts
omarespejel 8587464
Change python version in tests to 3.9
omarespejel 421aab3
Fix tests
omarespejel b2e7fa7
Fix conflict in config.py due to order of tf packages
omarespejel 264537b
Merge branch 'main' into add-fastai-mixin
omarespejel a8e32a3
Fix delete_repo function in test_fastai_integration
omarespejel b061df8
Merge branch 'add-fastai-mixin' of https://github.com/omarespejel/hug…
omarespejel f297f7c
Isort test_fastai_integration
omarespejel de7368b
Replace the repo_id name for model_id
omarespejel 3cfe4d5
Make fastai and fastcore versions flexible in setup.py
omarespejel 050904a
Confirm fastai supports python 3.10 in python-tests-yml
omarespejel f3b2000
Fix docs in fastai_utils.py
omarespejel 2d12300
Change the name of DummyModel for dummy_model
omarespejel edeee68
Handle pickling errors when exporting a fastai.Learner
omarespejel 028c80a
Change name of internal functions in fastai_utils.py
omarespejel 1bc2c41
black style to fastai_utils.py
omarespejel 26c8d15
Eliminate unnecessary comments from fastai_utils.py
omarespejel a7de8c4
Add capacity to load a local fastai.Learner to from_pretrained_keras
omarespejel 022c571
black format fastai_utils.py
omarespejel 5dafb25
Come back to Python 3.9 instead of 3.10
omarespejel 9a06a67
Change name name of save_fastai_learner to _save_pretrained_fastai in…
omarespejel 004d318
Change the name to _save_pretrained_fastai in __init__.py
omarespejel 947d58b
Fix nits in test_fastai_integration.py
omarespejel d6ee8bf
Add fastai integration to docs
omarespejel 18d0d27
Fix nits
omarespejel 7e63f46
Fix wording
omarespejel 2512ead
Allow _save_pretrained_fastai to directly export the model in save_di…
omarespejel 8633c0e
black fastai_utils.py
omarespejel 363cb81
Make the requirement of having a pyproject.toml optional
omarespejel ac0ef8a
Add warnings if the pyproject.toml does not contain a "build-system" …
omarespejel 2b28f4b
Change try-excepts for ifs in the warnings checking the fastai and fa…
omarespejel 88f4cd0
Fix nits in documentation
omarespejel d0268a9
Move errors in _check_fastai_fastcore_pyproject_versions to condition…
omarespejel 5ffd543
Misc improvements
osanseviero f36093e
Move the versions checks for fastai and fastcore to "else"'s
omarespejel cd4648a
Move the versions checks for fastai and fastcore to "else"'s
omarespejel 1795ce8
Merge branch 'add-fastai-mixin' of https://github.com/omarespejel/hug…
omarespejel f9dd4b0
Merge branch 'main' of https://github.com/huggingface/huggingface_hub…
omarespejel 465e0fa
Black reformat
omarespejel 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.
does fastai not support 3.10?
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.
If we run this on a matrix of versions, that means 3 runners will run, eh? Is this even all that necessary? I see most the other ones seem to run just on 3.8.
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.
I think running in different py versions is important here, specially as the pickling is different. Torch and TF integrations test 3.7 and 3.10, so I would do same here
https://github.com/huggingface/huggingface_hub/blob/main/.github/workflows/python-tests.yml#L55