-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Labels
benchmark-failureintegration test failedintegration test failed
Description
Benchmark scenario ID: WorldAgriCommodities
Benchmark scenario definition: https://github.com/ESA-APEx/apex_algorithms/blob/f455f453657d851be4f3f6426cc797b233e689f8/algorithm_catalog/wur/worldagrocommodities/benchmark_scenarios/wac_inference.json
openEO backend: openeo.dataspace.copernicus.eu
GitHub Actions workflow run: https://github.com/ESA-APEx/apex_algorithms/actions/runs/19705095934
Workflow artifacts: https://github.com/ESA-APEx/apex_algorithms/actions/runs/19705095934#artifacts
Test start: 2025-11-26 13:19:53.779957+00:00
Test duration: 0:06:01.991237
Test outcome: ❌ failed
Last successful test phase: download-reference
Failure in test phase: compare
Contact Information
| Name | Organization | Contact |
|---|---|---|
| Hans Vanrompay | VITO | Contact via VITO (VITO Website) |
Process Graph
{
"parcel_delineation1": {
"process_id": "wac_inference_africa",
"namespace": "https://raw.githubusercontent.com/ESA-APEx/apex_algorithms/c2d74e55afbc76ddb8eca9679196d1eab282e98c/algorithm_catalog/wur/worldagrocommodities/openeo_udp/wac_inference_africa.json",
"arguments": {
"spatial_extent": {
"west": 749000,
"south": -2378000,
"east": 750000,
"north": -2377000,
"crs": "EPSG:32638"
},
"temporal_extent": [
"2023-01-01",
"2024-01-01"
],
"crs": "EPSG:32638",
"model_id": "WorldAgriCommodities_Africa_v1"
},
"result": true
}
}Error Logs
scenario = BenchmarkScenario(id='WorldAgriCommodities', description='openEO pipeline for agricultural feature extraction and mode...rk/apex_algorithms/apex_algorithms/algorithm_catalog/wur/worldagrocommodities/benchmark_scenarios/wac_inference.json'))
connection_factory = <function connection_factory.<locals>.get_connection at 0x7fbf2deb0720>
tmp_path = PosixPath('/home/runner/work/apex_algorithms/apex_algorithms/qa/benchmarks/tmp_path_root/test_run_benchmark_WorldAgriCo0')
track_metric = <function track_metric.<locals>.track at 0x7fbf2deb0860>
track_phase = <function track_phase.<locals>.track at 0x7fbf2deb09a0>
upload_assets_on_fail = <function upload_assets_on_fail.<locals>.collect at 0x7fbf2deb0a40>
request = <FixtureRequest for <Function test_run_benchmark[WorldAgriCommodities]>>
@pytest.mark.parametrize(
"scenario",
[
# Use scenario id as parameterization id to give nicer test names.
pytest.param(uc, id=uc.id)
for uc in get_benchmark_scenarios()
],
)
def test_run_benchmark(
scenario: BenchmarkScenario,
connection_factory,
tmp_path: Path,
track_metric,
track_phase,
upload_assets_on_fail,
request,
):
track_metric("scenario_id", scenario.id)
with track_phase(phase="connect"):
# Check if a backend override has been provided via cli options.
override_backend = request.config.getoption("--override-backend")
backend_filter = request.config.getoption("--backend-filter")
if backend_filter and not re.match(backend_filter, scenario.backend):
# TODO apply filter during scenario retrieval, but seems to be hard to retrieve cli param
pytest.skip(
f"skipping scenario {scenario.id} because backend {scenario.backend} does not match filter {backend_filter!r}"
)
backend = scenario.backend
if override_backend:
_log.info(f"Overriding backend URL with {override_backend!r}")
backend = override_backend
connection: openeo.Connection = connection_factory(url=backend)
with track_phase(phase="create-job"):
# TODO #14 scenario option to use synchronous instead of batch job mode?
job = connection.create_job(
process_graph=scenario.process_graph,
title=f"APEx benchmark {scenario.id}",
additional=scenario.job_options,
)
track_metric("job_id", job.job_id)
with track_phase(phase="run-job"):
# TODO: monitor timing and progress
# TODO: abort excessively long batch jobs? https://github.com/Open-EO/openeo-python-client/issues/589
job.start_and_wait()
# TODO: separate "job started" and run phases?
with track_phase(phase="collect-metadata"):
collect_metrics_from_job_metadata(job, track_metric=track_metric)
results = job.get_results()
collect_metrics_from_results_metadata(results, track_metric=track_metric)
with track_phase(phase="download-actual"):
# Download actual results
actual_dir = tmp_path / "actual"
paths = results.download_files(target=actual_dir, include_stac_metadata=True)
# Upload assets on failure
upload_assets_on_fail(*paths)
with track_phase(phase="download-reference"):
reference_dir = download_reference_data(
scenario=scenario, reference_dir=tmp_path / "reference"
)
with track_phase(
phase="compare", describe_exception=analyse_results_comparison_exception
):
# Compare actual results with reference data
> assert_job_results_allclose(
actual=actual_dir,
expected=reference_dir,
tmp_path=tmp_path,
rtol=scenario.reference_options.get("rtol", 1e-6),
atol=scenario.reference_options.get("atol", 1e-6),
pixel_tolerance=scenario.reference_options.get("pixel_tolerance", 0.0),
)
tests/test_benchmarks.py:95:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
actual = PosixPath('/home/runner/work/apex_algorithms/apex_algorithms/qa/benchmarks/tmp_path_root/test_run_benchmark_WorldAgriCo0/actual')
expected = PosixPath('/home/runner/work/apex_algorithms/apex_algorithms/qa/benchmarks/tmp_path_root/test_run_benchmark_WorldAgriCo0/reference')
def assert_job_results_allclose(
actual: Union[BatchJob, JobResults, str, Path],
expected: Union[BatchJob, JobResults, str, Path],
*,
rtol: float = _DEFAULT_RTOL,
atol: float = _DEFAULT_ATOL,
pixel_tolerance: float = _DEFAULT_PIXELTOL,
tmp_path: Optional[Path] = None,
):
"""
Assert that two job results sets are equal (with tolerance).
:param actual: actual job results, provided as :py:class:`~openeo.rest.job.BatchJob` object,
:py:meth:`~openeo.rest.job.JobResults` object or path to directory with downloaded assets.
:param expected: expected job results, provided as :py:class:`~openeo.rest.job.BatchJob` object,
:py:meth:`~openeo.rest.job.JobResults` object or path to directory with downloaded assets.
:param rtol: relative tolerance
:param atol: absolute tolerance
:param pixel_tolerance: maximum fraction of pixels (in percent)
that is allowed to be significantly different (considering ``atol`` and ``rtol``)
:param tmp_path: root temp path to download results if needed.
It's recommended to pass pytest's `tmp_path` fixture here
:raises AssertionError: if not equal within the given tolerance
.. versionadded:: 0.31.0
.. warning::
This function is experimental and subject to change.
"""
issues = _compare_job_results(
actual, expected, rtol=rtol, atol=atol, pixel_tolerance=pixel_tolerance, tmp_path=tmp_path
)
if issues:
> raise AssertionError("\n".join(issues))
E AssertionError: File set mismatch: {'job-results.json', 'openEO.nc'} != {'job-results.json', 'openEO.tif'}
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/site-packages/openeo/testing/results.py:515: AssertionError
----------------------------- Captured stdout call -----------------------------
0:00:00 Job 'j-2511261319574069800a2f5f42a0add9': send 'start'
0:00:16 Job 'j-2511261319574069800a2f5f42a0add9': created (progress 0%)
0:00:21 Job 'j-2511261319574069800a2f5f42a0add9': running (progress N/A)
0:00:28 Job 'j-2511261319574069800a2f5f42a0add9': running (progress N/A)
0:00:36 Job 'j-2511261319574069800a2f5f42a0add9': running (progress N/A)
0:00:46 Job 'j-2511261319574069800a2f5f42a0add9': running (progress N/A)
0:00:58 Job 'j-2511261319574069800a2f5f42a0add9': running (progress N/A)
0:01:14 Job 'j-2511261319574069800a2f5f42a0add9': running (progress N/A)
0:01:33 Job 'j-2511261319574069800a2f5f42a0add9': running (progress N/A)
0:01:57 Job 'j-2511261319574069800a2f5f42a0add9': running (progress N/A)
0:02:27 Job 'j-2511261319574069800a2f5f42a0add9': running (progress N/A)
0:03:05 Job 'j-2511261319574069800a2f5f42a0add9': running (progress N/A)
0:03:52 Job 'j-2511261319574069800a2f5f42a0add9': running (progress N/A)
0:04:50 Job 'j-2511261319574069800a2f5f42a0add9': running (progress N/A)
0:05:50 Job 'j-2511261319574069800a2f5f42a0add9': finished (progress 100%)
------------------------------ Captured log call -------------------------------
INFO conftest:conftest.py:131 Connecting to 'openeo.dataspace.copernicus.eu'
INFO openeo.config:config.py:193 Loaded openEO client config from sources: []
INFO conftest:conftest.py:144 Checking for auth_env_var='OPENEO_AUTH_CLIENT_CREDENTIALS_CDSEFED' to drive auth against url='openeo.dataspace.copernicus.eu'.
INFO conftest:conftest.py:148 Extracted provider_id='CDSE' client_id='openeo-apex-benchmarks-service-account' from auth_env_var='OPENEO_AUTH_CLIENT_CREDENTIALS_CDSEFED'
INFO openeo.rest.connection:connection.py:255 Found OIDC providers: ['CDSE']
INFO openeo.rest.auth.oidc:oidc.py:404 Doing 'client_credentials' token request 'https://identity.dataspace.copernicus.eu/auth/realms/CDSE/protocol/openid-connect/token' with post data fields ['grant_type', 'client_id', 'client_secret', 'scope'] (client_id 'openeo-apex-benchmarks-service-account')
INFO openeo.rest.connection:connection.py:354 Obtained tokens: ['access_token', 'id_token']
INFO openeo.rest.job:job.py:436 Downloading Job result asset 'openEO.nc' from https://s3.waw3-1.openeo.v1.dataspace.copernicus.eu/openeo-data-prod-waw4-1/batch_jobs/j-2511261319574069800a2f5f42a0add9/openEO.nc?X-Proxy-Head-As-Get=true&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=5b512e71beb548d18e87c15c760047e8%2F20251126%2Fwaw4-1%2Fs3%2Faws4_request&X-Amz-Date=20251126T132549Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=host&X-Amz-Security-Token=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlX2FybiI6ImFybjpvcGVuZW93czppYW06Ojpyb2xlL29wZW5lby1kYXRhLXByb2Qtd2F3NC0xLXdvcmtzcGFjZSIsImluaXRpYWxfaXNzdWVyIjoib3BlbmVvLnByb2Qud2F3My0xLm9wZW5lby1pbnQudjEuZGF0YXNwYWNlLmNvcGVybmljdXMuZXUiLCJodHRwczovL2F3cy5hbWF6b24uY29tL3RhZ3MiOnsicHJpbmNpcGFsX3RhZ3MiOnsiam9iX2lkIjpbImotMjUxMTI2MTMxOTU3NDA2OTgwMGEyZjVmNDJhMGFkZDkiXSwidXNlcl9pZCI6WyI2YTc3ZmNkMS05YzA4LTQ2ZTktYjg3NS01NGZiOTk5YWIyMDAiXX0sInRyYW5zaXRpdmVfdGFnX2tleXMiOlsidXNlcl9pZCIsImpvYl9pZCJdfSwiaXNzIjoic3RzLndhdzMtMS5vcGVuZW8udjEuZGF0YXNwYWNlLmNvcGVybmljdXMuZXUiLCJzdWIiOiJvcGVuZW8tZHJpdmVyIiwiZXhwIjoxNzY0MTY3MTQ5LCJuYmYiOjE3NjQxNjM1NDksImlhdCI6MTc2NDE2MzU0OSwianRpIjoiMmU3MmEzY2YtYjA0YS00NzM1LTgyNzItODQzMjk4ZDUxNjk3IiwiYWNjZXNzX2tleV9pZCI6IjViNTEyZTcxYmViNTQ4ZDE4ZTg3YzE1Yzc2MDA0N2U4In0.npKUgeS8wEws2RPzVhtnmrSENgEqf8LMTk9yP0iMVc69SqVLDR-ZfORcO2eZAOOVUKHVk4aiAj4g79avupIq6RNPbzUnR-AQRDXMr9vVbay0f8Y1lZX_6ax-FVx9VVZwQMgnoy-pAoxznUxwkio4Q-9OBjO5vNRyYLHtnNHduJziPmwAz2aES7gE-Zy8bnmYeous3Hy4qeNBKBtZaunOho7I77e-BZnMTo827l5yzZ_2oTXocQ-i-6EXcsiJQh5sUllVvJDHuTbnxiKVENV23J3f_WYSllwSaDPwPYTKyalJlUkSKP4LMkFfHLVPvuw49y-2FdMvCAEdO0uA050nVw&X-Amz-Signature=e8c4c04f36de789eb6a82e1786c891ce3092dc697ece33f45ebc1cd4712d3f5b to /home/runner/work/apex_algorithms/apex_algorithms/qa/benchmarks/tmp_path_root/test_run_benchmark_WorldAgriCo0/actual/openEO.nc
INFO apex_algorithm_qa_tools.scenarios:util.py:345 Downloading reference data for scenario.id='WorldAgriCommodities' to reference_dir=PosixPath('/home/runner/work/apex_algorithms/apex_algorithms/qa/benchmarks/tmp_path_root/test_run_benchmark_WorldAgriCo0/reference'): start 2025-11-26 13:25:53.749688
INFO apex_algorithm_qa_tools.scenarios:util.py:345 Downloading source='https://s3.waw3-1.cloudferro.com/apex-benchmarks/gh-19588693309!tests_test_benchmarks.py__test_run_benchmark_WorldAgriCommodities_!actual/job-results.json' to path=PosixPath('/home/runner/work/apex_algorithms/apex_algorithms/qa/benchmarks/tmp_path_root/test_run_benchmark_WorldAgriCo0/reference/job-results.json'): start 2025-11-26 13:25:53.749994
INFO apex_algorithm_qa_tools.scenarios:util.py:351 Downloading source='https://s3.waw3-1.cloudferro.com/apex-benchmarks/gh-19588693309!tests_test_benchmarks.py__test_run_benchmark_WorldAgriCommodities_!actual/job-results.json' to path=PosixPath('/home/runner/work/apex_algorithms/apex_algorithms/qa/benchmarks/tmp_path_root/test_run_benchmark_WorldAgriCo0/reference/job-results.json'): end 2025-11-26 13:25:55.072776, elapsed 0:00:01.322782
INFO apex_algorithm_qa_tools.scenarios:util.py:345 Downloading source='https://s3.waw3-1.cloudferro.com/apex-benchmarks/gh-19588693309!tests_test_benchmarks.py__test_run_benchmark_WorldAgriCommodities_!actual/openEO.tif' to path=PosixPath('/home/runner/work/apex_algorithms/apex_algorithms/qa/benchmarks/tmp_path_root/test_run_benchmark_WorldAgriCo0/reference/openEO.tif'): start 2025-11-26 13:25:55.073146
INFO apex_algorithm_qa_tools.scenarios:util.py:351 Downloading source='https://s3.waw3-1.cloudferro.com/apex-benchmarks/gh-19588693309!tests_test_benchmarks.py__test_run_benchmark_WorldAgriCommodities_!actual/openEO.tif' to path=PosixPath('/home/runner/work/apex_algorithms/apex_algorithms/qa/benchmarks/tmp_path_root/test_run_benchmark_WorldAgriCo0/reference/openEO.tif'): end 2025-11-26 13:25:55.768216, elapsed 0:00:00.695070
INFO apex_algorithm_qa_tools.scenarios:util.py:351 Downloading reference data for scenario.id='WorldAgriCommodities' to reference_dir=PosixPath('/home/runner/work/apex_algorithms/apex_algorithms/qa/benchmarks/tmp_path_root/test_run_benchmark_WorldAgriCo0/reference'): end 2025-11-26 13:25:55.768409, elapsed 0:00:02.018721
INFO openeo.testing.results:results.py:418 Comparing job results: PosixPath('/home/runner/work/apex_algorithms/apex_algorithms/qa/benchmarks/tmp_path_root/test_run_benchmark_WorldAgriCo0/actual') vs PosixPath('/home/runner/work/apex_algorithms/apex_algorithms/qa/benchmarks/tmp_path_root/test_run_benchmark_WorldAgriCo0/reference')
Metadata
Metadata
Assignees
Labels
benchmark-failureintegration test failedintegration test failed