Skip to content

Commit

Permalink
minor update
Browse files Browse the repository at this point in the history
  • Loading branch information
yinggeh committed May 9, 2024
1 parent 4183d3a commit 6c2c01c
Showing 1 changed file with 20 additions and 26 deletions.
46 changes: 20 additions & 26 deletions qa/L0_lifecycle/lifecycle_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -3427,7 +3427,7 @@ def test_add_custom_config(self):
except Exception as ex:
self.assertTrue(False, "unexpected error {}".format(ex))

# Run inference on the model on all versions
# Run inference on the model on all versions. Only version 1, 3 should work.
for model_name, model_shape in zip(models_base, models_shape):
try:
iu.infer_exact(
Expand All @@ -3453,14 +3453,11 @@ def test_add_custom_config(self):
np.float32,
np.float32,
np.float32,
swap=False,
model_version=2,
)
self.assertTrue(
False, "expected error for unavailable model " + model_name
swap=True,
model_version=3,
)
except Exception as ex:
self.assertIn("Request for unknown model", ex.message())
self.assertTrue(False, "unexpected error {}".format(ex))

try:
iu.infer_exact(
Expand All @@ -3471,11 +3468,13 @@ def test_add_custom_config(self):
np.float32,
np.float32,
np.float32,
swap=True,
model_version=3,
model_version=2,
)
self.assertTrue(
False, "expected error for unavailable model " + model_name
)
except Exception as ex:
self.assertTrue(False, "unexpected error {}".format(ex))
self.assertIn("Request for unknown model", ex.message())

# Add custom model configuration, which cause model to be
# re-loaded and use custom config inside configs folder, which
Expand All @@ -3502,7 +3501,7 @@ def test_add_custom_config(self):
except Exception as ex:
self.assertTrue(False, "unexpected error {}".format(ex))

# Only version 2 should work...
# Only version 2 should work.
for model_name, model_shape in zip(models_base, models_shape):
try:
iu.infer_exact(
Expand All @@ -3528,7 +3527,6 @@ def test_add_custom_config(self):
np.float32,
np.float32,
np.float32,
swap=False,
model_version=1,
)
self.assertTrue(
Expand All @@ -3546,7 +3544,6 @@ def test_add_custom_config(self):
np.float32,
np.float32,
np.float32,
swap=False,
model_version=3,
)
self.assertTrue(
Expand Down Expand Up @@ -3577,7 +3574,7 @@ def test_delete_custom_config(self):
except Exception as ex:
self.assertTrue(False, "unexpected error {}".format(ex))

# Run inference on the model on all versions
# Run inference on the model on all versions. Only version 2 should work.
for model_name, model_shape in zip(models_base, models_shape):
try:
iu.infer_exact(
Expand All @@ -3588,14 +3585,11 @@ def test_delete_custom_config(self):
np.float32,
np.float32,
np.float32,
swap=False,
model_version=1,
)
self.assertTrue(
False, "expected error for unavailable model " + model_name
swap=True,
model_version=2,
)
except Exception as ex:
self.assertIn("Request for unknown model", ex.message())
self.assertTrue(False, "unexpected error {}".format(ex))

try:
iu.infer_exact(
Expand All @@ -3606,11 +3600,13 @@ def test_delete_custom_config(self):
np.float32,
np.float32,
np.float32,
swap=True,
model_version=2,
model_version=1,
)
self.assertTrue(
False, "expected error for unavailable model " + model_name
)
except Exception as ex:
self.assertTrue(False, "unexpected error {}".format(ex))
self.assertIn("Request for unknown model", ex.message())

try:
iu.infer_exact(
Expand All @@ -3621,7 +3617,6 @@ def test_delete_custom_config(self):
np.float32,
np.float32,
np.float32,
swap=False,
model_version=3,
)
self.assertTrue(
Expand Down Expand Up @@ -3651,7 +3646,7 @@ def test_delete_custom_config(self):
except Exception as ex:
self.assertTrue(False, "unexpected error {}".format(ex))

# Only version 1, 3 should work...
# Only version 1, 3 should work.
for model_name, model_shape in zip(models_base, models_shape):
try:
iu.infer_exact(
Expand Down Expand Up @@ -3692,7 +3687,6 @@ def test_delete_custom_config(self):
np.float32,
np.float32,
np.float32,
swap=False,
model_version=2,
)
self.assertTrue(
Expand Down

0 comments on commit 6c2c01c

Please sign in to comment.