Skip to content

Commit

Permalink
Merge branch 'main' into dholanda/ort_npu
Browse files Browse the repository at this point in the history
  • Loading branch information
danielholanda authored Oct 21, 2024
2 parents 7cd46d2 + 3f97d74 commit 50cd258
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 20 deletions.
1 change: 1 addition & 0 deletions .github/workflows/test_devices_plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ jobs:
conda install pylint
pip install pytest
pip install -e plugins/devices
pip install -e . # Required to test current tkml package instead of pypi version
pip install transformers timm
python -m pip check
- name: Lint with PyLint
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_turnkey.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ jobs:
python -m pip install --upgrade pip
conda install pylint=3.2.7
pip install pytest
pip install -e .
pip install -e plugins/devices
pip install transformers timm
pip install -e . # Required to test current tkml package instead of pypi version
python -m pip check
- name: Lint with PyLint
shell: bash -el {0}
Expand Down
7 changes: 2 additions & 5 deletions plugins/devices/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,15 @@ def get_specific_version(plugin_name: str, version_key: str) -> str:
],
python_requires=">=3.8, <3.12",
install_requires=[
"turnkeyml==4.0.0",
"turnkeyml>=4.0.0",
"importlib_metadata",
"onnx_tool",
"numpy<2",
"gitpython",
"timm==0.9.10",
],
include_package_data=True,
package_data={
"turnkeyml_plugin_devices": [
]
},
package_data={"turnkeyml_plugin_devices": []},
extras_require={
"onnxrt": [],
"torchrt": [],
Expand Down
6 changes: 1 addition & 5 deletions plugins/devices/test/benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,12 +287,8 @@ def test_008_cli_timeout(self):
"""
Make sure that the --timeout option and its associated reporting features work.
timeout.py is designed to take a long time to export, which gives us the
timeout.py is designed to take 20s to discover, which gives us the
opportunity to kill it with a timeout.
NOTE: this test can become flakey if:
- exporting timeout.py takes less time than the timeout
- the timeout kills the process before it has a chance to create a stats.yaml file
"""

testargs = [
Expand Down
7 changes: 4 additions & 3 deletions src/turnkeyml/common/test_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,22 +143,23 @@ def forward(self, x):
"timeout.py": """
# labels: name::timeout author::turnkey license::mit test_group::a task::test
import torch
import time
torch.manual_seed(0)
class LinearTestModel(torch.nn.Module):
def __init__(self, input_features, output_features):
super(LinearTestModel, self).__init__()
time.sleep(20)
self.fc = torch.nn.Linear(input_features, output_features)
def forward(self, x):
output = self.fc(x)
return output
input_features = 500000
output_features = 1000
input_features = 50
output_features = 10
# Model and input configurations
model = LinearTestModel(input_features, output_features)
Expand Down
2 changes: 1 addition & 1 deletion src/turnkeyml/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "4.0.2"
__version__ = "4.0.3"
6 changes: 1 addition & 5 deletions test/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -583,12 +583,8 @@ def test_018_cli_timeout(self):
"""
Make sure that the --timeout option and its associated reporting features work.
timeout.py is designed to take a long time to export, which gives us the
timeout.py is designed to take 20s to discover, which gives us the
opportunity to kill it with a timeout.
NOTE: this test can become flakey if:
- exporting timeout.py takes less time than the timeout
- the timeout kills the process before it has a chance to create a stats.yaml file
"""

testargs = [
Expand Down

0 comments on commit 50cd258

Please sign in to comment.