-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run process graphs inside process graphs #413
Comments
We could allow from_parameter/from_node in the process_id property. Or we need a process to run another process by name. Something like call_user_func in PHP or something like |
This is not going to be a API v1.x thing I guess? |
No, unfortunately, this would be 2.0. |
A 1.0 compatible solution to implement this kind of pluggable "callback" feature, I think:
not very scalable and nor maintainable, but it could work |
For the use case where you want to have a "variable" process id, I think the solution that integrates best without a breaking change would be to create a new process that allows calling another process. So if you'd need something like this: {
"process_graph": {
"load": {
"process_id": "load_collection",
"arguments": {
"id": "COPERNICUS_30",
"spatial_extent": null,
"temporal_extent": null
}
},
"reduce": {
"process_id": "reduce_dimension",
"arguments": {
"reducer": {
"process_graph": {
"stat": {
"process_id": { "from_parameter": "method" }, // <-- this is not possible, but useful
"arguments": {
"data": { "from_parameter": "data" }
},
"result": true
}
}
},
"dimension": "bands",
"data": { "from_node": "load" }
},
"result": true
}
}
} Instead, with a new process (e.g.
Is that feasible to implement? |
PR with a proposal: Open-EO/openeo-processes#307 |
My current preference goes rather to allowing:
rather than having to do run_process. Both options require backend compatibility, but I don't see one being more breaking than the other. The run_process option has the downside of more complexity IMO. |
Very biased, but importing or using such process graphs would basically break the Model Builder / Editor and most of the JS tooling and implementing this feature throughour the JS ecosystem would - I assume right now - take about a week of implementation time while a new process would ba about 2/3 hours effort on my side. Not sure how difficult this is on the back-end side to implement run_process. Just pointing it out here, not necesarrily a strong vote for any of the solutions. |
While trying to create a graph for an observed pixel composite (/processes#271) it came up that it is currently not possible to run a process graph inside another process graph. This occurred because we tried to pass a user-input process graph into an
apply_dimension
process were it should be executed.Take a look at the following process graph. The parameter
timestep_selector
should replace themax
reducer that is only used as a placeholder inside theapply_dimension
process. Instead ofmax
, different process graphs should be executable, depending on input, e.g.min
,median
.The text was updated successfully, but these errors were encountered: