Upload artifact.py with huggingface_hub
Browse files- artifact.py +10 -3
artifact.py
CHANGED
@@ -7,7 +7,14 @@ from abc import abstractmethod
|
|
7 |
from copy import deepcopy
|
8 |
from typing import Dict, List, Optional, Union, final
|
9 |
|
10 |
-
from .dataclass import
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
from .logging_utils import get_logger
|
12 |
from .parsing_utils import (
|
13 |
separate_inside_and_outside_square_brackets,
|
@@ -114,10 +121,10 @@ class Artifact(Dataclass):
|
|
114 |
_class_register = {}
|
115 |
|
116 |
type: str = Field(default=None, final=True, init=False)
|
117 |
-
__description__: str =
|
118 |
default=None, required=False, also_positional=False
|
119 |
)
|
120 |
-
__tags__: Dict[str, str] =
|
121 |
default_factory=dict, required=False, also_positional=False
|
122 |
)
|
123 |
__id__: str = InternalField(default=None, required=False, also_positional=False)
|
|
|
7 |
from copy import deepcopy
|
8 |
from typing import Dict, List, Optional, Union, final
|
9 |
|
10 |
+
from .dataclass import (
|
11 |
+
AbstractField,
|
12 |
+
Dataclass,
|
13 |
+
Field,
|
14 |
+
InternalField,
|
15 |
+
NonPositionalField,
|
16 |
+
fields,
|
17 |
+
)
|
18 |
from .logging_utils import get_logger
|
19 |
from .parsing_utils import (
|
20 |
separate_inside_and_outside_square_brackets,
|
|
|
121 |
_class_register = {}
|
122 |
|
123 |
type: str = Field(default=None, final=True, init=False)
|
124 |
+
__description__: str = NonPositionalField(
|
125 |
default=None, required=False, also_positional=False
|
126 |
)
|
127 |
+
__tags__: Dict[str, str] = NonPositionalField(
|
128 |
default_factory=dict, required=False, also_positional=False
|
129 |
)
|
130 |
__id__: str = InternalField(default=None, required=False, also_positional=False)
|