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 model like #14992
Merged
Merged
Add model like #14992
Changes from 60 commits
Commits
Show all changes
62 commits
Select commit
Hold shift + click to select a range
c3ee599
Add new model like command
sgugger b965359
Bad doc-styler
sgugger cf1e3f4
black and doc-styler, stop fighting!
sgugger fd620dd
black and doc-styler, stop fighting!
sgugger b354ae0
At last
sgugger 06d7a7f
Clean up
sgugger 041a19a
Typo
sgugger c65af6d
Bad doc-styler
sgugger 965f17f
Bad doc-styler
sgugger 9f15828
All good maybe?
sgugger 76e8767
Use constants
sgugger ba3dd9e
Add doc and type hints
sgugger a44469a
More cleaning
sgugger 56b1ce0
Add doc
sgugger 132ead2
Fix Copied from
sgugger fc49003
Doc template
sgugger 99383cd
Use typing.Pattern instead
sgugger 46e5e72
Framework-specific files
sgugger c78b8b9
Fixes
sgugger f111799
Select frameworks clean model init
sgugger 1a831dd
Deal with frameworks in main init
sgugger 3040598
fixes
sgugger 214ae5e
Last fix
sgugger 7a0eefb
Prompt user for info
sgugger 84560d4
Delete exemple config
sgugger 427986c
Last fixes
sgugger 7727d99
Add test config
sgugger 05c2c52
Fix bug with model_type included in each other
sgugger f790bd1
Fixes
sgugger dc96bca
More fixes
sgugger de8b700
More fixes
sgugger 51a1f0d
Adapt config
sgugger 82ecf50
Remove print statements
sgugger d5685c9
Will fix tokenization later, leave it broken for now
sgugger 5099fc8
Add test
sgugger 64bf927
Quality
sgugger 4f03465
Try this way
sgugger 7df6cfe
Debug
sgugger fa96aa1
Maybe by setting the path?
sgugger 91ff9d7
Let's try another way
sgugger df90379
It should go better when actually passing the arg...
sgugger 355139c
Remove debug statements and style
sgugger 735b292
Fix config
sgugger 3057e54
Add tests
sgugger 02e0cdd
Test require the three backends
sgugger 6aa6ef7
intermediate commit
sgugger 877f5fe
Revamp pattern replacements and start work on feature extractors
sgugger ef99f38
Adapt model info
sgugger 9908a3b
Finalize code for processors
sgugger b77fece
Fix in main init additions
sgugger d54ae5f
Finish questionnaire for processing classes
sgugger ce9a210
Fix file name
sgugger 16be1a2
Fix for real
sgugger 690815e
Fix patterns
sgugger ed06650
Style
sgugger 70b64d0
Remove needless warnings
sgugger 0f0f6e4
Copied from should work now.
sgugger d24475d
Include Copied form in blocks
sgugger 1bd2e45
Add test
sgugger 7a9fe98
More fixes and tests
sgugger 2633364
Apply suggestions from code review
sgugger f27667f
Address review comment
sgugger File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: Add model like runner | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
paths: | ||
- "src/**" | ||
- "tests/**" | ||
- ".github/**" | ||
types: [assigned, opened, synchronize, reopened] | ||
|
||
jobs: | ||
run_tests_templates: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Loading cache. | ||
uses: actions/cache@v2 | ||
id: cache | ||
with: | ||
path: ~/.cache/pip | ||
key: v1-tests_model_like | ||
restore-keys: | | ||
v1-tests_model_like-${{ hashFiles('setup.py') }} | ||
v1-tests_model_like | ||
|
||
- name: Install dependencies | ||
run: | | ||
pip install --upgrade pip!=21.3 | ||
sudo apt -y update && sudo apt install -y libsndfile1-dev | ||
pip install .[dev] | ||
|
||
- name: Create model files | ||
run: | | ||
transformers-cli add-new-model-like --config_file tests/fixtures/add_distilbert_like_config.json --path_to_repo . | ||
make style | ||
make fix-copies | ||
|
||
- name: Run all PyTorch modeling test | ||
run: | | ||
python -m pytest -n 2 --dist=loadfile -s --make-reports=tests_new_models tests/test_modeling_bert_new.py | ||
|
||
- name: Run style changes | ||
run: | | ||
git fetch origin master:master | ||
make style && make quality && make repo-consistency | ||
|
||
- name: Failure short reports | ||
if: ${{ always() }} | ||
run: cat reports/tests_new_models_failures_short.txt | ||
|
||
- name: Test suite reports artifacts | ||
if: ${{ always() }} | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: run_all_tests_new_models_test_reports | ||
path: reports |
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.
(I know this is in the original model templates too) I don't think
assigned
is necessary, as it will relaunch the tests when the PR is assigned to someone even though the tests will already have been runThere 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.
Will remove!