Skip to content

Commit

Permalink
run_udf(_externally): don't mention raster-cube in the schemas (#286)
Browse files Browse the repository at this point in the history
* run_udf(_externally): don't mention raster-cube in the schemas any more #285

* Apply suggestions from code review
  • Loading branch information
m-mohr authored Oct 25, 2021
1 parent 4c1e819 commit 6ec1848
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 38 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `predict_curve`
- `run_udf`: Exception `InvalidRuntime` added

### Removed

- Removed the explict schema for `raster-cube` in the `data` parameters and return values of `run_udf` and `run_udf_externally`. It's still possible to pass raster-cubes via the "any" data type, but it's discouraged due to scalability issues. [#285](https://github.com/Open-EO/openeo-processes/issues/285)

### Fixed

- `aggregate_temporal_period`: Clarified which dimension labels are present in the returned data cube. [#274](https://github.com/Open-EO/openeo-processes/issues/274)
Expand Down
26 changes: 7 additions & 19 deletions proposals/run_udf_externally.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "run_udf_externally",
"summary": "Run an externally hosted UDF container",
"description": "Runs a compatible UDF container that is either externally hosted by a service provider or running on a local machine of the user. The UDF container must follow the [openEO UDF specification](https://openeo.org/documentation/1.0/udfs.html).\n\nThe referenced UDF service can be executed in several processes such as ``aggregate_spatial()``, ``apply()``, ``apply_dimension()`` and ``reduce_dimension()``. In this case, an array is passed instead of a raster data cube. The user must ensure that the data is properly passed as an array so that the UDF can make sense of it.",
"description": "Runs a compatible UDF container that is either externally hosted by a service provider or running on a local machine of the user. The UDF container must follow the [openEO UDF specification](https://openeo.org/documentation/1.0/udfs.html).\n\nThe referenced UDF service can be executed in several processes such as ``aggregate_spatial()``, ``apply()``, ``apply_dimension()`` and ``reduce_dimension()``. In this case, an array is passed instead of a raster data cube. The user must ensure that the data is given in a way that the UDF code can make sense of it.",
"categories": [
"cubes",
"import",
Expand All @@ -11,13 +11,8 @@
"parameters": [
{
"name": "data",
"description": "The data to be passed to the UDF as an array or raster data cube.",
"description": "The data to be passed to the UDF.",
"schema": [
{
"title": "Raster data cube",
"type": "object",
"subtype": "raster-cube"
},
{
"title": "Array",
"type": "array",
Expand Down Expand Up @@ -53,18 +48,11 @@
}
],
"returns": {
"description": "The data processed by the UDF service.\n\n* Returns a raster data cube if a raster data cube is passed for `data`. Details on the dimensions and dimension properties (name, type, labels, reference system and resolution) depend on the UDF.\n* If an array is passed for `data`, the returned value can be of any data type, but is exactly what the UDF returns.",
"schema": [
{
"title": "Raster data cube",
"type": "object",
"subtype": "raster-cube"
},
{
"title": "Any",
"description": "Any data type."
}
]
"description": "The data processed by the UDF. The returned value can in principle be of any data type, but it depends on what is returned by the UDF code. Please see the implemented UDF interface for details.",
"schema": {
"title": "Any",
"description": "Any data type."
}
},
"links": [
{
Expand Down
26 changes: 7 additions & 19 deletions run_udf.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "run_udf",
"summary": "Run a UDF",
"description": "Runs a UDF in one of the supported runtime environments.\n\nThe process can either:\n\n1. load and run a UDF stored in a file on the server-side workspace of the authenticated user. The path to the UDF file must be relative to the root directory of the user's workspace.\n2. fetch and run a remotely stored and published UDF by absolute URI.\n3. run the source code specified inline as string.\n\nThe loaded UDF can be executed in several processes such as ``aggregate_spatial()``, ``apply()``, ``apply_dimension()`` and ``reduce_dimension()``. In this case, an array is passed instead of a raster data cube. The user must ensure that the data is properly passed as an array so that the UDF can make sense of it.",
"description": "Runs a UDF in one of the supported runtime environments.\n\nThe process can either:\n\n1. load and run a UDF stored in a file on the server-side workspace of the authenticated user. The path to the UDF file must be relative to the root directory of the user's workspace.\n2. fetch and run a remotely stored and published UDF by absolute URI.\n3. run the source code specified inline as string.\n\nThe loaded UDF can be executed in several processes such as ``aggregate_spatial()``, ``apply()``, ``apply_dimension()`` and ``reduce_dimension()``. The user must ensure that the data is given in a way that the UDF code can make sense of it.",
"categories": [
"cubes",
"import",
Expand All @@ -10,13 +10,8 @@
"parameters": [
{
"name": "data",
"description": "The data to be passed to the UDF as an array or raster data cube.",
"description": "The data to be passed to the UDF.",
"schema": [
{
"title": "Raster data cube",
"type": "object",
"subtype": "raster-cube"
},
{
"title": "Array",
"type": "array",
Expand Down Expand Up @@ -99,17 +94,10 @@
}
},
"returns": {
"description": "The data processed by the UDF.\n\n* Returns a raster data cube, if a raster data cube is passed for `data`. Details on the dimensions and dimension properties (name, type, labels, reference system and resolution) depend on the UDF.\n* If an array is passed for `data`, the returned value can be of any data type, but is exactly what the UDF returns.",
"schema": [
{
"title": "Raster data cube",
"type": "object",
"subtype": "raster-cube"
},
{
"title": "Any",
"description": "Any data type."
}
]
"description": "The data processed by the UDF. The returned value can be of any data type and is exactly what the UDF code returns.",
"schema": {
"title": "Any",
"description": "Any data type."
}
}
}

0 comments on commit 6ec1848

Please sign in to comment.