mirror of
https://github.com/open-mmlab/mmsegmentation.git
synced 2025-06-03 22:03:48 +08:00
[Enhance] Make scipy as a default dependency in runtime in dev-1.x
This commit is contained in:
parent
e98231ba5f
commit
925110044c
@ -140,6 +140,9 @@ def test_beit_init():
|
||||
}
|
||||
}
|
||||
model = BEiT(img_size=(512, 512))
|
||||
# If scipy is installed, this AttributeError would not be raised.
|
||||
from mmengine.utils import is_installed
|
||||
if not is_installed('scipy'):
|
||||
with pytest.raises(AttributeError):
|
||||
model.resize_rel_pos_embed(ckpt)
|
||||
|
||||
|
@ -138,6 +138,9 @@ def test_mae_init():
|
||||
}
|
||||
}
|
||||
model = MAE(img_size=(512, 512))
|
||||
# If scipy is installed, this AttributeError would not be raised.
|
||||
from mmengine.utils import is_installed
|
||||
if not is_installed('scipy'):
|
||||
with pytest.raises(AttributeError):
|
||||
model.resize_rel_pos_embed(ckpt)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user