Skip to content
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

failing benchmark "max_ndvi_composite" #52

Open
soxofaan opened this issue Nov 8, 2024 · 6 comments
Open

failing benchmark "max_ndvi_composite" #52

soxofaan opened this issue Nov 8, 2024 · 6 comments
Assignees

Comments

@soxofaan
Copy link
Contributor

soxofaan commented Nov 8, 2024

last run at the time: https://github.com/ESA-APEx/apex_algorithms/actions/runs/11684670042/job/32536394554

benchmark failure due to job failure:

E               openeo.rest.OpenEoApiError: [500] Internal: Server error: TypeError("'NoneType' object is not iterable") (Upstream ref: 'r-24110514497740198b2a6f53bb71cd0a') (ref: r-241105360b86482286aa860831ed76ea)
@soxofaan
Copy link
Contributor Author

soxofaan commented Nov 8, 2024

from logs of r-24110514497740198b2a6f53bb71cd0a:

	
Traceback (most recent call last):
  File "/opt/openeo/lib/python3.8/site-packages/flask/app.py", line 880, in full_dispatch_request
    rv = self.dispatch_request()
  File "/opt/openeo/lib/python3.8/site-packages/flask/app.py", line 865, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)  # type: ignore[no-any-return]
  File "/opt/openeo/lib/python3.8/site-packages/openeo_driver/users/auth.py", line 95, in decorated
    return f(*args, **kwargs)
  File "/opt/openeo/lib/python3.8/site-packages/openeo_driver/views.py", line 939, in start_job
    backend_implementation.batch_jobs.start_job(job_id=job_id, user=user)
  File "/opt/openeo/lib/python3.8/site-packages/openeogeotrellis/backend.py", line 1634, in start_job
    self._start_job(job_id, user, _get_vault_token)
  File "/opt/openeo/lib/python3.8/site-packages/openeogeotrellis/backend.py", line 1683, in _start_job
    job_dependencies = self._schedule_and_get_dependencies(
  File "/opt/openeo/lib/python3.8/site-packages/openeogeotrellis/backend.py", line 2202, in _schedule_and_get_dependencies
    convert_node(result_node, env=env.push({
  File "/opt/openeo/lib/python3.8/site-packages/openeo_driver/ProcessGraphDeserializer.py", line 456, in convert_node
    process_result = apply_process(process_id=process_id, args=processGraph.get('arguments', {}),
  File "/opt/openeo/lib/python3.8/site-packages/openeo_driver/ProcessGraphDeserializer.py", line 1706, in apply_process
    return evaluate_process_from_url(
  File "/opt/openeo/lib/python3.8/site-packages/openeo_driver/ProcessGraphDeserializer.py", line 1989, in evaluate_process_from_url
    return _evaluate_process_graph_process(
  File "/opt/openeo/lib/python3.8/site-packages/openeo_driver/ProcessGraphDeserializer.py", line 1962, in _evaluate_process_graph_process
    return evaluate(process_graph, env=env, do_dry_run=False)
  File "/opt/openeo/lib/python3.8/site-packages/openeo_driver/ProcessGraphDeserializer.py", line 431, in evaluate
    result = convert_node(top_level_node, env=env)
  File "/opt/openeo/lib/python3.8/site-packages/openeo_driver/ProcessGraphDeserializer.py", line 456, in convert_node
    process_result = apply_process(process_id=process_id, args=processGraph.get('arguments', {}),
  File "/opt/openeo/lib/python3.8/site-packages/openeo_driver/ProcessGraphDeserializer.py", line 1698, in apply_process
    args = {name: convert_node(expr, env=env) for (name, expr) in sorted(args.items())}
  File "/opt/openeo/lib/python3.8/site-packages/openeo_driver/ProcessGraphDeserializer.py", line 1698, in <dictcomp>
    args = {name: convert_node(expr, env=env) for (name, expr) in sorted(args.items())}
  File "/opt/openeo/lib/python3.8/site-packages/openeo_driver/ProcessGraphDeserializer.py", line 488, in convert_node
    return [convert_node(x, env=env) for x in processGraph]
  File "/opt/openeo/lib/python3.8/site-packages/openeo_driver/ProcessGraphDeserializer.py", line 488, in <listcomp>
    return [convert_node(x, env=env) for x in processGraph]
  File "/opt/openeo/lib/python3.8/site-packages/openeo_driver/ProcessGraphDeserializer.py", line 456, in convert_node
    process_result = apply_process(process_id=process_id, args=processGraph.get('arguments', {}),
  File "/opt/openeo/lib/python3.8/site-packages/openeo_driver/ProcessGraphDeserializer.py", line 1732, in apply_process
    return process_function(args=ProcessArgs(args, process_id=process_id), env=env)
  File "/opt/openeo/lib/python3.8/site-packages/openeo_driver/ProcessGraphDeserializer.py", line 1381, in filter_bbox
    spatial_extent = _extract_bbox_extent(args, "extent", process_id="filter_bbox")
  File "/opt/openeo/lib/python3.8/site-packages/openeo_driver/ProcessGraphDeserializer.py", line 1363, in _extract_bbox_extent
    d = {
  File "/opt/openeo/lib/python3.8/site-packages/openeo_driver/ProcessGraphDeserializer.py", line 1364, in <dictcomp>
    k: extract_arg(extent, name=k, process_id=process_id)
  File "/opt/openeo/lib/python3.8/site-packages/openeo_driver/ProcessGraphDeserializer.py", line 503, in extract_arg
    return _as_process_args(args, process_id=process_id).get_required(name=name)
  File "/opt/openeo/lib/python3.8/site-packages/openeo_driver/ProcessGraphDeserializer.py", line 495, in _as_process_args
    args = ProcessArgs(args, process_id=process_id)
  File "/opt/openeo/lib/python3.8/site-packages/openeo_driver/processes.py", line 287, in __init__
    super().__init__(args)
TypeError: 'NoneType' object is not iterable

@soxofaan
Copy link
Contributor Author

soxofaan commented Nov 8, 2024

found the issue:

benchmark scenario uses bbox as parameter name to pass the spatial extent:

"arguments": {
"bbox": {
"west": 5.07,
"east": 5.09,
"south": 51.21,
"north": 51.23
},

but the UDP expects a spatial_extent parameter:

"parameters": [
{
"name": "spatial_extent",

It was quite confusing to figure this out, beause the spatial_extent was made an optional parameter:

spatial_extent = Parameter.bounding_box(
name="spatial_extent", default=None, optional=True
)

I guess it would have failed with a much cleaner error if that parameter wasn't optional

@jdries you seemed to make it optional intentionally with 3e14e13#diff-0465fb74b5eed7572e8e0e73471b227c6ed5a472441522fc64c1a026878d809dL17 is there a particular reason for that?

@soxofaan
Copy link
Contributor Author

soxofaan commented Nov 8, 2024

@jdries I guess you commented on the bbox/spatial extent rename, which I fully understand.

My question was about making the parameter optional with a default value None/null (which doesn't work)

@jdries
Copy link
Contributor

jdries commented Nov 8, 2024

it's optional because a user may want to leave it empty, and specify some sort of spatial filtering later on, when using the udp in a larger pipeline, this is the same reasoning as for load_collection.

@soxofaan
Copy link
Contributor Author

ok makes sense, but the problem is then that that spatial_extent in the UDP is currently used with filter_bbox, which does not allow the extent to be null/None. It's probably better to move that parameter to load_collection where it is allowed to be null. Or is there a reason to have an explicit filter_bbox process instead of spatial_extent in load_collection?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants