fxn 0.0.10__tar.gz → 0.0.11__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {fxn-0.0.10 → fxn-0.0.11}/PKG-INFO +1 -1
- {fxn-0.0.10 → fxn-0.0.11}/fxn/api/__init__.py +1 -1
- {fxn-0.0.10 → fxn-0.0.11}/fxn/api/dtype.py +1 -1
- {fxn-0.0.10 → fxn-0.0.11}/fxn/api/predictor.py +25 -12
- {fxn-0.0.10 → fxn-0.0.11}/fxn/version.py +1 -1
- {fxn-0.0.10 → fxn-0.0.11}/fxn.egg-info/PKG-INFO +1 -1
- {fxn-0.0.10 → fxn-0.0.11}/LICENSE +0 -0
- {fxn-0.0.10 → fxn-0.0.11}/README.md +0 -0
- {fxn-0.0.10 → fxn-0.0.11}/fxn/__init__.py +0 -0
- {fxn-0.0.10 → fxn-0.0.11}/fxn/api/api.py +0 -0
- {fxn-0.0.10 → fxn-0.0.11}/fxn/api/environment.py +0 -0
- {fxn-0.0.10 → fxn-0.0.11}/fxn/api/feature.py +0 -0
- {fxn-0.0.10 → fxn-0.0.11}/fxn/api/prediction.py +0 -0
- {fxn-0.0.10 → fxn-0.0.11}/fxn/api/profile.py +0 -0
- {fxn-0.0.10 → fxn-0.0.11}/fxn/api/storage.py +0 -0
- {fxn-0.0.10 → fxn-0.0.11}/fxn/api/tag.py +0 -0
- {fxn-0.0.10 → fxn-0.0.11}/fxn/api/user.py +0 -0
- {fxn-0.0.10 → fxn-0.0.11}/fxn/cli/__init__.py +0 -0
- {fxn-0.0.10 → fxn-0.0.11}/fxn/cli/auth.py +0 -0
- {fxn-0.0.10 → fxn-0.0.11}/fxn/cli/env.py +0 -0
- {fxn-0.0.10 → fxn-0.0.11}/fxn/cli/misc.py +0 -0
- {fxn-0.0.10 → fxn-0.0.11}/fxn/cli/predict.py +0 -0
- {fxn-0.0.10 → fxn-0.0.11}/fxn/cli/predictors.py +0 -0
- {fxn-0.0.10 → fxn-0.0.11}/fxn/magic.py +0 -0
- {fxn-0.0.10 → fxn-0.0.11}/fxn.egg-info/SOURCES.txt +0 -0
- {fxn-0.0.10 → fxn-0.0.11}/fxn.egg-info/dependency_links.txt +0 -0
- {fxn-0.0.10 → fxn-0.0.11}/fxn.egg-info/entry_points.txt +0 -0
- {fxn-0.0.10 → fxn-0.0.11}/fxn.egg-info/requires.txt +0 -0
- {fxn-0.0.10 → fxn-0.0.11}/fxn.egg-info/top_level.txt +0 -0
- {fxn-0.0.10 → fxn-0.0.11}/setup.cfg +0 -0
- {fxn-0.0.10 → fxn-0.0.11}/setup.py +0 -0
@@ -7,7 +7,7 @@ from .dtype import Dtype
|
|
7
7
|
from .environment import EnvironmentVariable
|
8
8
|
from .feature import Feature
|
9
9
|
from .prediction import CloudPrediction, EdgePrediction, Prediction
|
10
|
-
from .predictor import Acceleration, AccessMode, Parameter, Predictor, PredictorStatus, PredictorType, Signature
|
10
|
+
from .predictor import Acceleration, AccessMode, EnumerationMember, Parameter, Predictor, PredictorStatus, PredictorType, Signature
|
11
11
|
from .profile import Profile
|
12
12
|
from .storage import Storage, UploadType
|
13
13
|
from .user import User
|
@@ -65,10 +65,11 @@ class Predictor:
|
|
65
65
|
description
|
66
66
|
range
|
67
67
|
optional
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
68
|
+
enumeration {{
|
69
|
+
name
|
70
|
+
value
|
71
|
+
}}
|
72
|
+
default_value: defaultValue
|
72
73
|
}}
|
73
74
|
outputs {{
|
74
75
|
name
|
@@ -362,20 +363,32 @@ class Parameter:
|
|
362
363
|
description (str): Parameter description.
|
363
364
|
optional (bool): Parameter is optional.
|
364
365
|
range (tuple): Parameter value range for numeric parameters.
|
365
|
-
|
366
|
-
|
367
|
-
intDefault (int): Parameter default integer value.
|
368
|
-
boolDefault (bool): Parameter default boolean value.
|
366
|
+
enumeration (list): Parameter value choices for enumeration parameters.
|
367
|
+
default_value (str | float | int | bool): Parameter default value.
|
369
368
|
"""
|
370
369
|
name: Optional[str] = None
|
371
370
|
type: Optional[Dtype] = None
|
372
371
|
description: Optional[str] = None
|
373
372
|
optional: Optional[bool] = None
|
374
373
|
range: Optional[Tuple[float, float]] = None
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
374
|
+
enumeration: Optional[List[EnumerationMember]] = None
|
375
|
+
default_value: Optional[Union[str, float, int, bool]] = None
|
376
|
+
|
377
|
+
def __post_init__ (self):
|
378
|
+
enumeration = [EnumerationMember(**member) if isinstance(member, dict) else member for member in self.enumeration] if self.enumeration else self.enumeration
|
379
|
+
object.__setattr__(self, "enumeration", enumeration)
|
380
|
+
|
381
|
+
@dataclass(frozen=True)
|
382
|
+
class EnumerationMember:
|
383
|
+
"""
|
384
|
+
Prediction parameter enumeration member.
|
385
|
+
|
386
|
+
Members:
|
387
|
+
name (str): Enumeration member name.
|
388
|
+
value (str | float | int): Enumeration member value.
|
389
|
+
"""
|
390
|
+
name: str
|
391
|
+
value: Union[str, float, int]
|
379
392
|
|
380
393
|
class Acceleration (str, Enum):
|
381
394
|
"""
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|