Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyfowers committed Aug 26, 2024
1 parent e9bbe9f commit 1db4701
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 17 deletions.
8 changes: 1 addition & 7 deletions src/turnkeyml/common/test_helpers.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import os
import shutil
from typing import List, Tuple, Any, Dict, Optional
from typing import List, Dict, Optional
import onnx
import turnkeyml.common.filesystem as fs
import turnkeyml.common.build as build
Expand Down Expand Up @@ -224,7 +224,6 @@ def get_stats_and_state(
def assert_success_of_builds(
test_script_files: List[str],
cache_dir: str,
info_property: Tuple[str, Any] = None,
check_perf: bool = False,
check_opset: Optional[int] = None,
check_iteration_count: Optional[int] = None,
Expand All @@ -250,11 +249,6 @@ def assert_success_of_builds(
script_build_found = True
builds_found += 1

if info_property is not None:
assert (
build_state.info.__dict__[info_property[0]] == info_property[1]
), f"{build_state.info.__dict__[info_property[0]]} == {info_property[1]}"

if check_perf:
assert stats.stats["mean_latency"] > 0
assert stats.stats["throughput"] > 0
Expand Down
8 changes: 0 additions & 8 deletions src/turnkeyml/sequence/tool_plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,4 @@ def get_supported_tools():

supported_tools.append(tool_class)

# Give a "benchmark" tool installed by a plugin priority over
# a "benchmark" tool built into turnkeyml
tool_names = [tool.unique_name for tool in supported_tools]
if "benchmark" not in tool_names:
from turnkeyml.run.benchmark_model import Benchmark

supported_tools.append(Benchmark)

return supported_tools
4 changes: 2 additions & 2 deletions test/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ def test_08_cli_onnx_opset(self):
turnkeycli()

assert_success_of_builds(
[test_script], cache_dir, None, check_perf=False, check_opset=user_opset
[test_script], cache_dir, check_perf=False, check_opset=user_opset
)

def test_09_cli_process_isolation(self):
Expand All @@ -396,7 +396,7 @@ def test_09_cli_process_isolation(self):
with patch.object(sys, "argv", testargs):
turnkeycli()

assert_success_of_builds([test_script], cache_dir, None, check_perf=False)
assert_success_of_builds([test_script], cache_dir, check_perf=False)

@unittest.skipIf(
platform.system() == "Windows",
Expand Down

0 comments on commit 1db4701

Please sign in to comment.