Skip to content

Commit 730dd8a

Browse files
issue 525 add predict_onnx
1 parent 711c080 commit 730dd8a

File tree

2 files changed

+55
-0
lines changed

2 files changed

+55
-0
lines changed

openeo_driver/ProcessGraphDeserializer.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1289,6 +1289,10 @@ def get_validated_parameter(args, param_name, default_value, expected_type, min_
12891289

12901290
return predictors.fit_class_catboost(target=target, iterations=iterations, depth=depth, seed=seed)
12911291

1292+
@process_registry_100.add_function(spec=read_spec("openeo-processes/experimental/predict_onnx.json"))
1293+
@process_registry_2xx.add_function(spec=read_spec("openeo-processes/experimental/predict_onnx.json"))
1294+
def predict_onnx(args: ProcessArgs, env: EvalEnv):
1295+
raise NoPythonImplementationError
12921296

12931297
@process_registry_100.add_function(spec=read_spec("openeo-processes/experimental/predict_random_forest.json"))
12941298
@process_registry_2xx.add_function(spec=read_spec("openeo-processes/experimental/predict_random_forest.json"))
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{
2+
"id": "predict_onnx",
3+
"summary": "Predict class probabilities from an onnx machine learning model",
4+
"description": "Applies an onnx machine learning model to an datacube.",
5+
"categories": [
6+
"machine learning"
7+
],
8+
"experimental": true,
9+
"parameters": [
10+
{
11+
"name": "data",
12+
"description": "A raster data cube.",
13+
"schema": {
14+
"type": "object",
15+
"subtype": "datacube",
16+
"dimensions": [
17+
{
18+
"type": "spatial",
19+
"axis": [
20+
"x",
21+
"y"
22+
]
23+
}
24+
]
25+
}
26+
},
27+
{
28+
"name": "model",
29+
"description": "A url to an onnx model.",
30+
"schema": {
31+
"type": "string"
32+
}
33+
}
34+
],
35+
"returns": {
36+
"description": "A raster data cube with the newly computed values",
37+
"schema": {
38+
"type": "object",
39+
"subtype": "datacube",
40+
"dimensions": [
41+
{
42+
"type": "spatial",
43+
"axis": [
44+
"x",
45+
"y"
46+
]
47+
}
48+
]
49+
}
50+
}
51+
}

0 commit comments

Comments
 (0)