Vision-CAIR
commited on
Upload folder using huggingface_hub
Browse files- registry.py +9 -9
registry.py
CHANGED
@@ -31,16 +31,16 @@ class Registry:
|
|
31 |
def wrap(model_cls):
|
32 |
from .base_model import BaseModel
|
33 |
|
34 |
-
assert issubclass(
|
35 |
-
|
36 |
-
), "All models must inherit BaseModel class"
|
37 |
|
38 |
-
if name in cls.mapping["model_name_mapping"]:
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
cls.mapping["model_name_mapping"][name] = model_cls
|
45 |
return model_cls
|
46 |
|
|
|
31 |
def wrap(model_cls):
|
32 |
from .base_model import BaseModel
|
33 |
|
34 |
+
# assert issubclass(
|
35 |
+
# model_cls, BaseModel
|
36 |
+
# ), "All models must inherit BaseModel class"
|
37 |
|
38 |
+
# if name in cls.mapping["model_name_mapping"]:
|
39 |
+
# raise KeyError(
|
40 |
+
# "Name '{}' already registered for {}.".format(
|
41 |
+
# name, cls.mapping["model_name_mapping"][name]
|
42 |
+
# )
|
43 |
+
# )
|
44 |
cls.mapping["model_name_mapping"][name] = model_cls
|
45 |
return model_cls
|
46 |
|