Skip to content

Commit 7726839

Browse files
Merge pull request #434 from Open-EO/issue525-onnx-process
issue 525 add predict_onnx
2 parents 3851374 + 730dd8a commit 7726839

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
@@ -1316,6 +1316,10 @@ def get_validated_parameter(args, param_name, default_value, expected_type, min_
13161316

13171317
return predictors.fit_class_catboost(target=target, iterations=iterations, depth=depth, seed=seed)
13181318

1319+
@process_registry_100.add_function(spec=read_spec("openeo-processes/experimental/predict_onnx.json"))
1320+
@process_registry_2xx.add_function(spec=read_spec("openeo-processes/experimental/predict_onnx.json"))
1321+
def predict_onnx(args: ProcessArgs, env: EvalEnv):
1322+
raise NoPythonImplementationError
13191323

13201324
@process_registry_100.add_function(spec=read_spec("openeo-processes/experimental/predict_random_forest.json"))
13211325
@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)