diff --git a/openeo_driver/ProcessGraphDeserializer.py b/openeo_driver/ProcessGraphDeserializer.py index abc890ca..47475605 100644 --- a/openeo_driver/ProcessGraphDeserializer.py +++ b/openeo_driver/ProcessGraphDeserializer.py @@ -1289,6 +1289,10 @@ def get_validated_parameter(args, param_name, default_value, expected_type, min_ return predictors.fit_class_catboost(target=target, iterations=iterations, depth=depth, seed=seed) +@process_registry_100.add_function(spec=read_spec("openeo-processes/experimental/predict_onnx.json")) +@process_registry_2xx.add_function(spec=read_spec("openeo-processes/experimental/predict_onnx.json")) +def predict_onnx(args: ProcessArgs, env: EvalEnv): + raise NoPythonImplementationError @process_registry_100.add_function(spec=read_spec("openeo-processes/experimental/predict_random_forest.json")) @process_registry_2xx.add_function(spec=read_spec("openeo-processes/experimental/predict_random_forest.json")) diff --git a/openeo_driver/specs/openeo-processes/experimental/predict_onnx.json b/openeo_driver/specs/openeo-processes/experimental/predict_onnx.json new file mode 100644 index 00000000..f6f6eda5 --- /dev/null +++ b/openeo_driver/specs/openeo-processes/experimental/predict_onnx.json @@ -0,0 +1,51 @@ +{ + "id": "predict_onnx", + "summary": "Predict class probabilities from an onnx machine learning model", + "description": "Applies an onnx machine learning model to an datacube.", + "categories": [ + "machine learning" + ], + "experimental": true, + "parameters": [ + { + "name": "data", + "description": "A raster data cube.", + "schema": { + "type": "object", + "subtype": "datacube", + "dimensions": [ + { + "type": "spatial", + "axis": [ + "x", + "y" + ] + } + ] + } + }, + { + "name": "model", + "description": "A url to an onnx model.", + "schema": { + "type": "string" + } + } + ], + "returns": { + "description": "A raster data cube with the newly computed values", + "schema": { + "type": "object", + "subtype": "datacube", + "dimensions": [ + { + "type": "spatial", + "axis": [ + "x", + "y" + ] + } + ] + } + } +} \ No newline at end of file