Skip to content

Commit

Permalink
fix import mmrazor error in mmcls test (open-mmlab#467)
Browse files Browse the repository at this point in the history
  • Loading branch information
RunningLeon authored May 13, 2022
1 parent 9a4028b commit 6eb83a9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/test_codebase/test_mmcls/test_classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ def test_init_pytorch_model(from_mmrazor: Any):
_ = _task_processor.from_mmrazor
return
assert from_mmrazor == _task_processor.from_mmrazor

if from_mmrazor:
pytest.importorskip('mmrazor', reason='mmrazor is not installed.')
model = _task_processor.init_pytorch_model(None)
assert isinstance(model, BaseClassifier)

Expand Down

0 comments on commit 6eb83a9

Please sign in to comment.