Skip to content

Commit a686e0f

Browse files
Fix otx load checkpoint (#4438)
bypass OTX's incremental loading Signed-off-by: Ashwin Vaidya <[email protected]>
1 parent 94c0423 commit a686e0f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/otx/core/model/anomaly.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,10 @@ def on_load_checkpoint(self, checkpoint: dict[str, Any]) -> None:
457457
for key, value in anomaly_attrs.items():
458458
setattr(self, key, value)
459459

460+
def load_state_dict_incrementally(self, ckpt: dict[str, Any], *args, **kwargs) -> None:
461+
"""Bypass OTXModel's load_state_dict_incrementally."""
462+
return self.load_state_dict(ckpt, *args, **kwargs)
463+
460464
def load_state_dict(self, ckpt: dict[str, Any], *args, **kwargs) -> None:
461465
"""Load state dictionary from checkpoint state dictionary.
462466

0 commit comments

Comments
 (0)