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.
Files changed (31) hide show
  1. {fxn-0.0.10 → fxn-0.0.11}/PKG-INFO +1 -1
  2. {fxn-0.0.10 → fxn-0.0.11}/fxn/api/__init__.py +1 -1
  3. {fxn-0.0.10 → fxn-0.0.11}/fxn/api/dtype.py +1 -1
  4. {fxn-0.0.10 → fxn-0.0.11}/fxn/api/predictor.py +25 -12
  5. {fxn-0.0.10 → fxn-0.0.11}/fxn/version.py +1 -1
  6. {fxn-0.0.10 → fxn-0.0.11}/fxn.egg-info/PKG-INFO +1 -1
  7. {fxn-0.0.10 → fxn-0.0.11}/LICENSE +0 -0
  8. {fxn-0.0.10 → fxn-0.0.11}/README.md +0 -0
  9. {fxn-0.0.10 → fxn-0.0.11}/fxn/__init__.py +0 -0
  10. {fxn-0.0.10 → fxn-0.0.11}/fxn/api/api.py +0 -0
  11. {fxn-0.0.10 → fxn-0.0.11}/fxn/api/environment.py +0 -0
  12. {fxn-0.0.10 → fxn-0.0.11}/fxn/api/feature.py +0 -0
  13. {fxn-0.0.10 → fxn-0.0.11}/fxn/api/prediction.py +0 -0
  14. {fxn-0.0.10 → fxn-0.0.11}/fxn/api/profile.py +0 -0
  15. {fxn-0.0.10 → fxn-0.0.11}/fxn/api/storage.py +0 -0
  16. {fxn-0.0.10 → fxn-0.0.11}/fxn/api/tag.py +0 -0
  17. {fxn-0.0.10 → fxn-0.0.11}/fxn/api/user.py +0 -0
  18. {fxn-0.0.10 → fxn-0.0.11}/fxn/cli/__init__.py +0 -0
  19. {fxn-0.0.10 → fxn-0.0.11}/fxn/cli/auth.py +0 -0
  20. {fxn-0.0.10 → fxn-0.0.11}/fxn/cli/env.py +0 -0
  21. {fxn-0.0.10 → fxn-0.0.11}/fxn/cli/misc.py +0 -0
  22. {fxn-0.0.10 → fxn-0.0.11}/fxn/cli/predict.py +0 -0
  23. {fxn-0.0.10 → fxn-0.0.11}/fxn/cli/predictors.py +0 -0
  24. {fxn-0.0.10 → fxn-0.0.11}/fxn/magic.py +0 -0
  25. {fxn-0.0.10 → fxn-0.0.11}/fxn.egg-info/SOURCES.txt +0 -0
  26. {fxn-0.0.10 → fxn-0.0.11}/fxn.egg-info/dependency_links.txt +0 -0
  27. {fxn-0.0.10 → fxn-0.0.11}/fxn.egg-info/entry_points.txt +0 -0
  28. {fxn-0.0.10 → fxn-0.0.11}/fxn.egg-info/requires.txt +0 -0
  29. {fxn-0.0.10 → fxn-0.0.11}/fxn.egg-info/top_level.txt +0 -0
  30. {fxn-0.0.10 → fxn-0.0.11}/setup.cfg +0 -0
  31. {fxn-0.0.10 → fxn-0.0.11}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fxn
3
- Version: 0.0.10
3
+ Version: 0.0.11
4
4
  Summary: Run on-device and cloud AI prediction functions in Python. Register at https://hub.fxn.ai.
5
5
  Home-page: https://fxn.ai
6
6
  Author: NatML Inc.
@@ -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
@@ -28,5 +28,5 @@ class Dtype (str, Enum):
28
28
  image = "image"
29
29
  video = "video"
30
30
  audio = "audio"
31
- _3d = "3d"
31
+ model = "model"
32
32
  binary = "binary"
@@ -65,10 +65,11 @@ class Predictor:
65
65
  description
66
66
  range
67
67
  optional
68
- string_default: stringDefault
69
- float_default: floatDefault
70
- int_default: intDefault
71
- bool_default: boolDefault
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
- stringDefault (str): Parameter default string value.
366
- floatDefault (float): Parameter default float value.
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
- string_default: Optional[str] = None
376
- float_default: Optional[float] = None
377
- int_default: Optional[int] = None
378
- bool_default: Optional[bool] = None
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
  """
@@ -3,4 +3,4 @@
3
3
  # Copyright © 2023 NatML Inc. All Rights Reserved.
4
4
  #
5
5
 
6
- __version__ = "0.0.10"
6
+ __version__ = "0.0.11"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fxn
3
- Version: 0.0.10
3
+ Version: 0.0.11
4
4
  Summary: Run on-device and cloud AI prediction functions in Python. Register at https://hub.fxn.ai.
5
5
  Home-page: https://fxn.ai
6
6
  Author: NatML Inc.
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