-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test coverage & add mock test for full milabench runs (#234)
* Remove numpy 2.0.0 * Try to bypass HPU hangs * Ensure that torch metadata gathering cannot fail * Add unit test run * Update tests * Remove duplicated code * Add dry command regression tests * Do a mock run where everything except run is executed * Add coverage * Run mock milabench on a per bench basis to identify issues more easily * Make sure install failure triggers test failure * Retrieve exception raised inside asyncio * ensure deterministic order * Update Python to 3.11 --------- Co-authored-by: pierre.delaunay <[email protected]> Co-authored-by: Pierre Delaunay <[email protected]>
- Loading branch information
1 parent
d669feb
commit 127d18c
Showing
46 changed files
with
3,030 additions
and
1,168 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
name: unit | ||
|
||
on: | ||
push: | ||
|
||
# Runs for pull requests | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
# Runs on publish | ||
release: | ||
types: | ||
[published] | ||
|
||
# Allow manual triggers | ||
workflow_dispatch: | ||
|
||
|
||
jobs: | ||
tests: | ||
runs-on: ubuntu-latest | ||
|
||
# Cancel previous jobs if a new version was pushed | ||
concurrency: | ||
group: "${{ github.ref }}-${{ matrix.arch }}" | ||
cancel-in-progress: true | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.11' | ||
|
||
- name: dependencies | ||
run: | | ||
pip install -U pip | ||
pip install poetry | ||
poetry env use python3.11 | ||
source $(poetry env info -p)/bin/activate | ||
# | ||
# poetry doesnot work when installing those !? | ||
# | ||
pip install antlr4-python3-runtime==4.9.3 | ||
pip install -e . | ||
pip install -e benchmate | ||
# | ||
# | ||
# | ||
poetry install --with dev | ||
- name: tests | ||
run: | | ||
source $(poetry env info -p)/bin/activate | ||
coverage run --source=milabench -m pytest --ignore=tests/integration tests/ | ||
coverage report -m | ||
coverage xml | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
file: ./coverage.xml | ||
flags: unittests | ||
env_vars: PLATFORM,PYTHON | ||
name: codecov-umbrella | ||
fail_ci_if_error: false |
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
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
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
"""This file is generated, do not modify""" | ||
|
||
__tag__ = "v0.1.0-32-ge9e52501" | ||
__commit__ = "e9e52501ad92d2ee2dac97e66f601a0458404986" | ||
__date__ = "2024-06-26 02:37:50 -0400" | ||
__tag__ = "v0.1.0-24-gdd7f3888" | ||
__commit__ = "dd7f3888ac0524b3b587e415d1de0e2019cd751f" | ||
__date__ = "2024-07-03 16:07:47 -0400" |
Oops, something went wrong.