-
Notifications
You must be signed in to change notification settings - Fork 2.8k
[ci] Simplify tests, add CI, patch paraphrase_mining_embeddings
#2350
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
Merged
tomaarsen
merged 12 commits into
huggingface:master
from
tomaarsen:tests/simplify_and_ci
Dec 12, 2023
Merged
Changes from 11 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
ea7ea51
Simplify tests, cheaper to run
tomaarsen bfdcf20
Add simple CI
tomaarsen c1473cf
Also install pytest
tomaarsen 5a28e81
Remove Python 3.12, not supported with torch yet
tomaarsen ef6db32
No CI for Python 3.6 - too deprecated
tomaarsen 8293b5c
Apply patch to paraphrase_mining_embeddings
tomaarsen d6f8c34
Stop trying to cache loaded Models
tomaarsen 2db0b9f
Increase lower bound of pretrained scores
tomaarsen 44a23f5
Prevent duplicate ST install
tomaarsen b49c772
Install requirements.txt within the cached section
tomaarsen 41ad475
Relax lower bound on training test
tomaarsen b6553e8
Reintroduce slow tests, can be ran with 'pytest -m slow'
tomaarsen 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 hidden or 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,52 @@ | ||
| name: Unit tests | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - master | ||
| - v*-release | ||
| pull_request: | ||
| branches: | ||
| - master | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
|
|
||
| test_sampling: | ||
| name: Run unit tests | ||
| strategy: | ||
| matrix: | ||
| python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] | ||
| os: [ubuntu-latest, windows-latest] | ||
| fail-fast: false | ||
| runs-on: ${{ matrix.os }} | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v3 | ||
|
|
||
| - name: Setup Python environment | ||
| uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
|
|
||
| - name: Try to load cached dependencies | ||
| uses: actions/cache@v3 | ||
| id: restore-cache | ||
| with: | ||
| path: ${{ env.pythonLocation }} | ||
| key: python-dependencies-${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('setup.py') }}-${{ hashFiles('requirements.txt') }}-${{ env.pythonLocation }} | ||
|
|
||
| - name: Install external dependencies on cache miss | ||
| run: | | ||
| python -m pip install --no-cache-dir --upgrade pip | ||
| python -m pip install --no-cache-dir -r requirements.txt | ||
| python -m pip install --no-cache-dir pytest | ||
| if: steps.restore-cache.outputs.cache-hit != 'true' | ||
|
|
||
| - name: Install the checked-out sentence-transformers | ||
| run: python -m pip install . | ||
|
|
||
| - name: Run unit tests | ||
| shell: bash | ||
| run: | | ||
| pytest -sv tests/ |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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
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.
Uh oh!
There was an error while loading. Please reload this page.