-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from microsoft/dev/setup-refactor
Refine setup process 2
- Loading branch information
Showing
26 changed files
with
760 additions
and
364 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Integrated Test for Torch Model | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build-linux: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
max-parallel: 5 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python 3.6 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.6.10 | ||
|
||
# # to cache and restore the download data and python packages. | ||
# # still have bug (Cache not found for input keys) | ||
# # leave the issue to another PR | ||
# - uses: actions/cache@v2 | ||
# id: cache | ||
# with: | ||
# path: | | ||
# /home/runner/work/nn-Meter/data/testmodels | ||
# /home/runner/.nn_meter/data | ||
# # /opt/hostedtoolcache/Python/3.6.10/x64/lib/python3.6 | ||
# key: ${{hashFiles('setup.py')}}-${{hashFiles('tests/requirements.txt') }} | ||
# # location remider: | ||
# # pwd: /home/runner/work/nn-Meter/nn-Meter | ||
# # python /opt/hostedtoolcache/Python/3.6.10/x64/lib/python3.6/site-packages | ||
# # pythonLocation: /opt/hostedtoolcache/Python/3.6.10/x64 | ||
# # LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.6.10/x64/lib | ||
# # package path: /opt/hostedtoolcache/Python/3.6.10/x64/lib/python3.6/site-packages | ||
|
||
- name: Install dependencies | ||
# if: steps.cache.outputs.cache-hit != 'true' | ||
run: | | ||
pip install onnx==1.9.0 | ||
pip install torch==1.9.0 | ||
pip install torchvision==0.10.0 | ||
- name: Install nn-Meter | ||
run: pip install . | ||
|
||
- name: Integration test | ||
run: python tests/integration_test_torch.py | ||
|
||
- name: Diff result with reference | ||
run: diff tests/test_result_torch.txt tests/reference_result_torch.txt |
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.