[Bugfix] Revert inspection code in #13743 (#13832)

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
This commit is contained in:
Cyrus Leung 2025-02-26 00:18:50 +08:00 committed by GitHub
parent 6522d55b6f
commit f4133ce4e5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -364,12 +364,6 @@ class _ModelRegistry:
raise ValueError(msg)
model = _LazyRegisteredModel(*split_str)
try:
model.inspect_model_cls()
except Exception as exc:
msg = f"Unable to inspect model {model_cls}"
raise RuntimeError(msg) from exc
elif isinstance(model_cls, type) and issubclass(model_cls, nn.Module):
model = _RegisteredModel.from_model_cls(model_cls)
else: