fxn 0.0.33__tar.gz → 0.0.35__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.33 → fxn-0.0.35}/PKG-INFO +1 -1
- fxn-0.0.35/fxn/libs/macos/Function.dylib +0 -0
- fxn-0.0.35/fxn/libs/windows/Function.dll +0 -0
- {fxn-0.0.33 → fxn-0.0.35}/fxn/services/prediction/fxnc.py +14 -3
- {fxn-0.0.33 → fxn-0.0.35}/fxn/services/prediction/service.py +3 -2
- {fxn-0.0.33 → fxn-0.0.35}/fxn/version.py +1 -1
- {fxn-0.0.33 → fxn-0.0.35}/fxn.egg-info/PKG-INFO +1 -1
- fxn-0.0.33/fxn/libs/macos/Function.dylib +0 -0
- fxn-0.0.33/fxn/libs/windows/Function.dll +0 -0
- {fxn-0.0.33 → fxn-0.0.35}/LICENSE +0 -0
- {fxn-0.0.33 → fxn-0.0.35}/README.md +0 -0
- {fxn-0.0.33 → fxn-0.0.35}/fxn/__init__.py +0 -0
- {fxn-0.0.33 → fxn-0.0.35}/fxn/cli/__init__.py +0 -0
- {fxn-0.0.33 → fxn-0.0.35}/fxn/cli/auth.py +0 -0
- {fxn-0.0.33 → fxn-0.0.35}/fxn/cli/env.py +0 -0
- {fxn-0.0.33 → fxn-0.0.35}/fxn/cli/misc.py +0 -0
- {fxn-0.0.33 → fxn-0.0.35}/fxn/cli/predict.py +0 -0
- {fxn-0.0.33 → fxn-0.0.35}/fxn/cli/predictors.py +0 -0
- {fxn-0.0.33 → fxn-0.0.35}/fxn/function.py +0 -0
- {fxn-0.0.33 → fxn-0.0.35}/fxn/graph/__init__.py +0 -0
- {fxn-0.0.33 → fxn-0.0.35}/fxn/graph/client.py +0 -0
- {fxn-0.0.33 → fxn-0.0.35}/fxn/libs/__init__.py +0 -0
- {fxn-0.0.33 → fxn-0.0.35}/fxn/libs/linux/__init__.py +0 -0
- {fxn-0.0.33 → fxn-0.0.35}/fxn/libs/macos/__init__.py +0 -0
- {fxn-0.0.33 → fxn-0.0.35}/fxn/libs/windows/__init__.py +0 -0
- {fxn-0.0.33 → fxn-0.0.35}/fxn/magic.py +0 -0
- {fxn-0.0.33 → fxn-0.0.35}/fxn/services/__init__.py +0 -0
- {fxn-0.0.33 → fxn-0.0.35}/fxn/services/environment.py +0 -0
- {fxn-0.0.33 → fxn-0.0.35}/fxn/services/prediction/__init__.py +0 -0
- {fxn-0.0.33 → fxn-0.0.35}/fxn/services/predictor.py +0 -0
- {fxn-0.0.33 → fxn-0.0.35}/fxn/services/storage.py +0 -0
- {fxn-0.0.33 → fxn-0.0.35}/fxn/services/user.py +0 -0
- {fxn-0.0.33 → fxn-0.0.35}/fxn/types/__init__.py +0 -0
- {fxn-0.0.33 → fxn-0.0.35}/fxn/types/dtype.py +0 -0
- {fxn-0.0.33 → fxn-0.0.35}/fxn/types/environment.py +0 -0
- {fxn-0.0.33 → fxn-0.0.35}/fxn/types/prediction.py +0 -0
- {fxn-0.0.33 → fxn-0.0.35}/fxn/types/predictor.py +0 -0
- {fxn-0.0.33 → fxn-0.0.35}/fxn/types/profile.py +0 -0
- {fxn-0.0.33 → fxn-0.0.35}/fxn/types/storage.py +0 -0
- {fxn-0.0.33 → fxn-0.0.35}/fxn/types/tag.py +0 -0
- {fxn-0.0.33 → fxn-0.0.35}/fxn/types/user.py +0 -0
- {fxn-0.0.33 → fxn-0.0.35}/fxn/types/value.py +0 -0
- {fxn-0.0.33 → fxn-0.0.35}/fxn.egg-info/SOURCES.txt +0 -0
- {fxn-0.0.33 → fxn-0.0.35}/fxn.egg-info/dependency_links.txt +0 -0
- {fxn-0.0.33 → fxn-0.0.35}/fxn.egg-info/entry_points.txt +0 -0
- {fxn-0.0.33 → fxn-0.0.35}/fxn.egg-info/requires.txt +0 -0
- {fxn-0.0.33 → fxn-0.0.35}/fxn.egg-info/top_level.txt +0 -0
- {fxn-0.0.33 → fxn-0.0.35}/pyproject.toml +0 -0
- {fxn-0.0.33 → fxn-0.0.35}/setup.cfg +0 -0
Binary file
|
Binary file
|
@@ -55,12 +55,14 @@ class FXNValue(Structure): pass
|
|
55
55
|
class FXNValueMap(Structure): pass
|
56
56
|
class FXNConfiguration(Structure): pass
|
57
57
|
class FXNPrediction(Structure): pass
|
58
|
+
class FXNPredictionStream(Structure): pass
|
58
59
|
class FXNPredictor(Structure): pass
|
59
60
|
|
60
61
|
FXNValueRef = POINTER(FXNValue)
|
61
62
|
FXNValueMapRef = POINTER(FXNValueMap)
|
62
63
|
FXNConfigurationRef = POINTER(FXNConfiguration)
|
63
64
|
FXNPredictionRef = POINTER(FXNPrediction)
|
65
|
+
FXNPredictionStreamRef = POINTER(FXNPredictionStream)
|
64
66
|
FXNPredictorRef = POINTER(FXNPredictor)
|
65
67
|
|
66
68
|
def load_fxnc (path: Path) -> CDLL:
|
@@ -171,15 +173,24 @@ def load_fxnc (path: Path) -> CDLL:
|
|
171
173
|
# FXNPredictionGetLogLength
|
172
174
|
fxnc.FXNPredictionGetLogLength.argtypes = [FXNPredictionRef, POINTER(c_int32)]
|
173
175
|
fxnc.FXNPredictionGetLogLength.restype = FXNStatus
|
176
|
+
# FXNPredictionStreamRelease
|
177
|
+
fxnc.FXNPredictionStreamRelease.argtypes = [FXNPredictionStreamRef]
|
178
|
+
fxnc.FXNPredictionStreamRelease.restype = FXNStatus
|
179
|
+
# FXNPredictionStreamReadNext
|
180
|
+
fxnc.FXNPredictionStreamReadNext.argtypes = [FXNPredictionStreamRef, POINTER(FXNPredictionRef)]
|
181
|
+
fxnc.FXNPredictionStreamReadNext.restype = FXNStatus
|
174
182
|
# FXNPredictorCreate
|
175
183
|
fxnc.FXNPredictorCreate.argtypes = [FXNConfigurationRef, POINTER(FXNPredictorRef)]
|
176
184
|
fxnc.FXNPredictorCreate.restype = FXNStatus
|
177
185
|
# FXNPredictorRelease
|
178
186
|
fxnc.FXNPredictorRelease.argtypes = [FXNPredictorRef]
|
179
187
|
fxnc.FXNPredictorRelease.restype = FXNStatus
|
180
|
-
#
|
181
|
-
fxnc.
|
182
|
-
fxnc.
|
188
|
+
# FXNPredictorCreatePrediction
|
189
|
+
fxnc.FXNPredictorCreatePrediction.argtypes = [FXNPredictorRef, FXNValueMapRef, POINTER(FXNPredictionRef)]
|
190
|
+
fxnc.FXNPredictorCreatePrediction.restype = FXNStatus
|
191
|
+
# FXNPredictorStreamPrediction
|
192
|
+
fxnc.FXNPredictorStreamPrediction.argtypes = [FXNPredictionRef, FXNValueMapRef, POINTER(FXNPredictionStreamRef)]
|
193
|
+
fxnc.FXNPredictorStreamPrediction.restype = FXNStatus
|
183
194
|
# FXNGetVersion
|
184
195
|
fxnc.FXNGetVersion.argtypes = []
|
185
196
|
fxnc.FXNGetVersion.restype = c_char_p
|
@@ -155,7 +155,8 @@ class PredictionService:
|
|
155
155
|
prediction = self.__parse_prediction(prediction, raw_outputs=raw_outputs, return_binary_path=return_binary_path)
|
156
156
|
# Check edge prediction
|
157
157
|
if prediction.type != PredictorType.Edge or raw_outputs:
|
158
|
-
|
158
|
+
yield prediction
|
159
|
+
continue
|
159
160
|
# Load edge predictor
|
160
161
|
predictor = self.__load(prediction)
|
161
162
|
self.__cache[tag] = predictor
|
@@ -370,7 +371,7 @@ class PredictionService:
|
|
370
371
|
value = to_fxn_value(fxnc, value, copy=False)
|
371
372
|
fxnc.FXNValueMapSetValue(input_map, name.encode(), value)
|
372
373
|
# Predict
|
373
|
-
status = fxnc.
|
374
|
+
status = fxnc.FXNPredictorCreatePrediction(predictor, input_map, byref(prediction))
|
374
375
|
assert status.value == FXNStatus.OK, f"Failed to create {tag} prediction with status: {status.value}"
|
375
376
|
# Marshal prediction
|
376
377
|
id = create_string_buffer(256)
|
Binary file
|
Binary file
|
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
|
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
|