Skip to content

Commit e6b498c

Browse files
authored
fix: fix flaky clarify model monitor test (#5107)
1 parent 6b7f0c5 commit e6b498c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/unit/sagemaker/monitor/test_clarify_model_monitor.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -568,11 +568,12 @@ def test_clarify_model_monitor():
568568

569569
# The subclass should has monitoring_type() defined
570570
# noinspection PyAbstractClass
571-
class DummyClarifyModelMonitoir(ClarifyModelMonitor):
571+
class DummyClarifyModelMonitor(ClarifyModelMonitor):
572+
_TEST_CLASS = True
572573
pass
573574

574575
with pytest.raises(TypeError):
575-
DummyClarifyModelMonitoir.monitoring_type()
576+
DummyClarifyModelMonitor.monitoring_type()
576577

577578

578579
def test_clarify_model_monitor_invalid_update(clarify_model_monitors):
@@ -593,6 +594,8 @@ def test_clarify_model_monitor_invalid_attach(sagemaker_session):
593594
)
594595
# attach, invalid monitoring type
595596
for clarify_model_monitor_cls in ClarifyModelMonitor.__subclasses__():
597+
if hasattr(clarify_model_monitor_cls, "_TEST_CLASS"):
598+
continue
596599
with pytest.raises(TypeError):
597600
clarify_model_monitor_cls.attach(SCHEDULE_NAME, sagemaker_session)
598601

0 commit comments

Comments
 (0)