Skip to content

Commit 3f97d74

Browse files
Fix major CI bugs (#233)
* Fix CI timeout issues * Update description * Fix major bug * Rev version number * Ensure the correct tkml gets installed * Force install of correct tkml * Force reinstall * Foce current version * Fix other workflows
1 parent a42bba8 commit 3f97d74

File tree

7 files changed

+11
-20
lines changed

7 files changed

+11
-20
lines changed

.github/workflows/test_devices_plugin.yml

+1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ jobs:
5050
conda install pylint
5151
pip install pytest
5252
pip install -e plugins/devices
53+
pip install -e . # Required to test current tkml package instead of pypi version
5354
pip install transformers timm
5455
python -m pip check
5556
- name: Lint with PyLint

.github/workflows/test_turnkey.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ jobs:
3535
python -m pip install --upgrade pip
3636
conda install pylint=3.2.7
3737
pip install pytest
38-
pip install -e .
3938
pip install -e plugins/devices
4039
pip install transformers timm
40+
pip install -e . # Required to test current tkml package instead of pypi version
4141
python -m pip check
4242
- name: Lint with PyLint
4343
shell: bash -el {0}

plugins/devices/setup.py

+2-5
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,15 @@ def get_specific_version(plugin_name: str, version_key: str) -> str:
3333
],
3434
python_requires=">=3.8, <3.12",
3535
install_requires=[
36-
"turnkeyml==4.0.0",
36+
"turnkeyml>=4.0.0",
3737
"importlib_metadata",
3838
"onnx_tool",
3939
"numpy<2",
4040
"gitpython",
4141
"timm==0.9.10",
4242
],
4343
include_package_data=True,
44-
package_data={
45-
"turnkeyml_plugin_devices": [
46-
]
47-
},
44+
package_data={"turnkeyml_plugin_devices": []},
4845
extras_require={
4946
"onnxrt": [],
5047
"torchrt": [],

plugins/devices/test/benchmark.py

+1-5
Original file line numberDiff line numberDiff line change
@@ -287,12 +287,8 @@ def test_008_cli_timeout(self):
287287
"""
288288
Make sure that the --timeout option and its associated reporting features work.
289289
290-
timeout.py is designed to take a long time to export, which gives us the
290+
timeout.py is designed to take 20s to discover, which gives us the
291291
opportunity to kill it with a timeout.
292-
293-
NOTE: this test can become flakey if:
294-
- exporting timeout.py takes less time than the timeout
295-
- the timeout kills the process before it has a chance to create a stats.yaml file
296292
"""
297293

298294
testargs = [

src/turnkeyml/common/test_helpers.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -143,22 +143,23 @@ def forward(self, x):
143143
"timeout.py": """
144144
# labels: name::timeout author::turnkey license::mit test_group::a task::test
145145
import torch
146-
146+
import time
147147
torch.manual_seed(0)
148148
149149
150150
class LinearTestModel(torch.nn.Module):
151151
def __init__(self, input_features, output_features):
152152
super(LinearTestModel, self).__init__()
153+
time.sleep(20)
153154
self.fc = torch.nn.Linear(input_features, output_features)
154155
155156
def forward(self, x):
156157
output = self.fc(x)
157158
return output
158159
159160
160-
input_features = 500000
161-
output_features = 1000
161+
input_features = 50
162+
output_features = 10
162163
163164
# Model and input configurations
164165
model = LinearTestModel(input_features, output_features)

src/turnkeyml/version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "4.0.2"
1+
__version__ = "4.0.3"

test/cli.py

+1-5
Original file line numberDiff line numberDiff line change
@@ -583,12 +583,8 @@ def test_018_cli_timeout(self):
583583
"""
584584
Make sure that the --timeout option and its associated reporting features work.
585585
586-
timeout.py is designed to take a long time to export, which gives us the
586+
timeout.py is designed to take 20s to discover, which gives us the
587587
opportunity to kill it with a timeout.
588-
589-
NOTE: this test can become flakey if:
590-
- exporting timeout.py takes less time than the timeout
591-
- the timeout kills the process before it has a chance to create a stats.yaml file
592588
"""
593589

594590
testargs = [

0 commit comments

Comments
 (0)