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

Enable run of integration tests like resnet #16

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/before_merge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
env:
pytest_verbosity: 2
pytest_report_title: "⭐️ Pytest Results ⭐️"
RUN_INTEGRATION_TESTS: 1
run: |
source venv/bin/activate
python3 -m pytest --github-report tests/*.py -s
6 changes: 4 additions & 2 deletions tests/test_real_world.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import unittest
from torch_ttnn import ttnn
import collections
import os


class TestRealWorld(unittest.TestCase):
Expand All @@ -15,8 +16,9 @@ def tearDown(self):
# Close the device
ttnn.close_device(self.device)

@unittest.skip(
"Skip this test because it take 135 MB to download the ResNet18 model. Un-skip it if you want to test it."
@unittest.skipUnless(
os.getenv("RUN_INTEGRATION_TESTS", "0") == "1",
"Skip this test because it takes 135 MB to download the ResNet18 model. Set RUN_INTEGRATION_TESTS=1 to run it.",
)
def test_resnet(self):
# Download model from cloud
Expand Down
Loading