Skip to content

Commit

Permalink
Fix after merging
Browse files Browse the repository at this point in the history
  • Loading branch information
junrushao committed Sep 11, 2023
1 parent 980c241 commit fa50019
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions tests/python/relax/test_relax_operators.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ def check_assertion_error(func_name, func_arg, expected_message):
# generated error at the bottom of a stack trace
assert "AssertionError" in e.args[0]
assert expected_message in e.args[0]
except AssertionError:
return
assert not passed

run_cpu(AssertOpTest, "passes", tvm.nd.array(np.array(1).astype("int32")))
Expand Down
2 changes: 1 addition & 1 deletion tests/python/relax/test_training_setup_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def backbone(
[pred_sinfo, pred_sinfo],
)

with pytest.raises(TVMError):
with pytest.raises((TVMError, ValueError)):
SetupTrainer(
MSELoss(reduction="sum"),
SGD(0.001),
Expand Down

0 comments on commit fa50019

Please sign in to comment.