Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
IlyasMoutawwakil committed Nov 28, 2024
1 parent 60a4093 commit f693c44
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,16 @@ def test_api_launch(device, scenario, library, task, model):
def test_api_push_to_hub_mixin():
benchmark_name = "test_api_push_to_hub_mixin"

scenario_config = InferenceConfig(memory=True, latency=True, duration=1, iterations=1, warmup_runs=1)
backend_config = PyTorchConfig(model="google-bert/bert-base-uncased", device="cpu")
launcher_config = ProcessConfig(device_isolation=False)
scenario_config = InferenceConfig(
duration=1,
iterations=1,
warmup_runs=1,
memory=True,
latency=True,
input_shapes=INPUT_SHAPES,
)
benchmark_config = BenchmarkConfig(
name=benchmark_name,
scenario=scenario_config,
Expand Down
6 changes: 6 additions & 0 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ def test_cli_exit_code_0(launcher):
"name=test",
"launcher=" + launcher,
# compatible task and model
"scenario.input_shapes.batch_size=1",
"scenario.input_shapes.sequence_length=16",
"backend.task=text-classification",
"backend.model=bert-base-uncased",
"backend.device=cpu",
Expand All @@ -88,6 +90,8 @@ def test_cli_exit_code_1(launcher):
"name=test",
"launcher=" + launcher,
# incompatible task and model to trigger an error
"scenario.input_shapes.batch_size=1",
"scenario.input_shapes.sequence_length=16",
"backend.task=image-classification",
"backend.model=bert-base-uncased",
"backend.device=cpu",
Expand All @@ -111,6 +115,8 @@ def test_cli_numactl(launcher):
"name=test",
"launcher=" + launcher,
"launcher.numactl=True",
"scenario.input_shapes.batch_size=1",
"scenario.input_shapes.sequence_length=16",
"backend.task=text-classification",
"backend.model=bert-base-uncased",
"backend.device=cpu",
Expand Down

0 comments on commit f693c44

Please sign in to comment.