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

Add model like #14992

Merged
merged 62 commits into from Jan 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
c3ee599
Add new model like command
sgugger Dec 30, 2021
b965359
Bad doc-styler
sgugger Dec 30, 2021
cf1e3f4
black and doc-styler, stop fighting!
sgugger Dec 30, 2021
fd620dd
black and doc-styler, stop fighting!
sgugger Dec 30, 2021
b354ae0
At last
sgugger Dec 30, 2021
06d7a7f
Clean up
sgugger Dec 30, 2021
041a19a
Typo
sgugger Dec 30, 2021
c65af6d
Bad doc-styler
sgugger Dec 30, 2021
965f17f
Bad doc-styler
sgugger Dec 30, 2021
9f15828
All good maybe?
sgugger Dec 30, 2021
76e8767
Use constants
sgugger Dec 30, 2021
ba3dd9e
Add doc and type hints
sgugger Jan 10, 2022
a44469a
More cleaning
sgugger Jan 11, 2022
56b1ce0
Add doc
sgugger Jan 11, 2022
132ead2
Fix Copied from
sgugger Jan 11, 2022
fc49003
Doc template
sgugger Jan 11, 2022
99383cd
Use typing.Pattern instead
sgugger Jan 11, 2022
46e5e72
Framework-specific files
sgugger Jan 11, 2022
c78b8b9
Fixes
sgugger Jan 11, 2022
f111799
Select frameworks clean model init
sgugger Jan 12, 2022
1a831dd
Deal with frameworks in main init
sgugger Jan 12, 2022
3040598
fixes
sgugger Jan 12, 2022
214ae5e
Last fix
sgugger Jan 12, 2022
7a0eefb
Prompt user for info
sgugger Jan 12, 2022
84560d4
Delete exemple config
sgugger Jan 12, 2022
427986c
Last fixes
sgugger Jan 12, 2022
7727d99
Add test config
sgugger Jan 13, 2022
05c2c52
Fix bug with model_type included in each other
sgugger Jan 13, 2022
f790bd1
Fixes
sgugger Jan 13, 2022
dc96bca
More fixes
sgugger Jan 13, 2022
de8b700
More fixes
sgugger Jan 13, 2022
51a1f0d
Adapt config
sgugger Jan 13, 2022
82ecf50
Remove print statements
sgugger Jan 13, 2022
d5685c9
Will fix tokenization later, leave it broken for now
sgugger Jan 13, 2022
5099fc8
Add test
sgugger Jan 13, 2022
64bf927
Quality
sgugger Jan 13, 2022
4f03465
Try this way
sgugger Jan 13, 2022
7df6cfe
Debug
sgugger Jan 13, 2022
fa96aa1
Maybe by setting the path?
sgugger Jan 13, 2022
91ff9d7
Let's try another way
sgugger Jan 13, 2022
df90379
It should go better when actually passing the arg...
sgugger Jan 13, 2022
355139c
Remove debug statements and style
sgugger Jan 13, 2022
735b292
Fix config
sgugger Jan 13, 2022
3057e54
Add tests
sgugger Jan 14, 2022
02e0cdd
Test require the three backends
sgugger Jan 14, 2022
6aa6ef7
intermediate commit
sgugger Jan 18, 2022
877f5fe
Revamp pattern replacements and start work on feature extractors
sgugger Jan 19, 2022
ef99f38
Adapt model info
sgugger Jan 19, 2022
9908a3b
Finalize code for processors
sgugger Jan 19, 2022
b77fece
Fix in main init additions
sgugger Jan 20, 2022
d54ae5f
Finish questionnaire for processing classes
sgugger Jan 20, 2022
ce9a210
Fix file name
sgugger Jan 20, 2022
16be1a2
Fix for real
sgugger Jan 20, 2022
690815e
Fix patterns
sgugger Jan 20, 2022
ed06650
Style
sgugger Jan 20, 2022
70b64d0
Remove needless warnings
sgugger Jan 20, 2022
0f0f6e4
Copied from should work now.
sgugger Jan 20, 2022
d24475d
Include Copied form in blocks
sgugger Jan 20, 2022
1bd2e45
Add test
sgugger Jan 20, 2022
7a9fe98
More fixes and tests
sgugger Jan 20, 2022
2633364
Apply suggestions from code review
sgugger Jan 24, 2022
f27667f
Address review comment
sgugger Jan 24, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
60 changes: 60 additions & 0 deletions .github/workflows/add-model-like.yml
@@ -0,0 +1,60 @@
name: Add model like runner

on:
push:
branches:
- master
pull_request:
paths:
- "src/**"
- "tests/**"
- ".github/**"
types: [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