-
Notifications
You must be signed in to change notification settings - Fork 42
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
Context parameter in openeo.UDF.from_file() causes confusion #520
Comments
I'd like to point out that this is not only a client issue, but a less obvious part of openeo process graphs with run_udf. There are multiple ways to get "configuration" or Directly in
or through the parent process, e.g.
note that the
The first solution (direct
However, the solution with passing through the context from "upstream" is still important to cover, e.g. in UDPs or services where the context or parts of the context come from (UDP) parameters. |
regardless, we can at least throw warnings client side when it looks like the user might have forgotten something to get the context inside the UDF properly |
an alternative solution is to use |
This is also something we could check for (e.g. in |
Note that most of our examples in python client do not show how to use the context. Just adding that there would probably help a lot, as users can then just copy-paste a working example? |
=> |
A user let us know that the following code does not pass the context to his UDF:
The solution was to pass the context in the from_file method instead:
We should either:
The text was updated successfully, but these errors were encountered: