Upload artifact.py with huggingface_hub
Browse files- artifact.py +2 -2
artifact.py
CHANGED
@@ -134,8 +134,8 @@ class Artifact(Dataclass):
|
|
134 |
|
135 |
if cls.is_registered_type(snake_case_key):
|
136 |
assert (
|
137 |
-
cls._class_register[snake_case_key] == artifact_class
|
138 |
-
), f"Artifact class name must be unique, '{snake_case_key}' already exists for
|
139 |
|
140 |
return snake_case_key
|
141 |
|
|
|
134 |
|
135 |
if cls.is_registered_type(snake_case_key):
|
136 |
assert (
|
137 |
+
str(cls._class_register[snake_case_key]) == str(artifact_class)
|
138 |
+
), f"Artifact class name must be unique, '{snake_case_key}' already exists for {cls._class_register[snake_case_key]}. Cannot be overriden by {artifact_class}."
|
139 |
|
140 |
return snake_case_key
|
141 |
|