Skip to content

Commit b020a9e

Browse files
committed
Issue #4/#14 start with spec for benchmark scenario files
1 parent f9b5b13 commit b020a9e

File tree

3 files changed

+24
-4
lines changed

3 files changed

+24
-4
lines changed

benchmark_scenarios/README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Benchmark scenarios
2+
3+
Benchmark scenarios are defined as JSON files in this folder.
4+
5+
> [!WARNING]
6+
> The format of these files is [subject to change](https://github.com/ESA-APEx/apex_algorithms/issues/14).
7+
8+
9+
Each of these files should contain an array of benchmark scenario objects,
10+
which have the following properties:
11+
12+
13+
14+
| Element | Type | Description |
15+
| --------------- | ------------ | ------------------------------------ |
16+
| id | string | **REQUIRED.** Benchmark scenario identifier. |
17+
| type | string | **REQUIRED.** Must be set to "openeo" currently. |
18+
| description | string | Description of the benchmark scenario. |
19+
| backend | string | **REQUIRED.** The openEO backend URL to be used. |
20+
| process_graph | object | **REQUIRED.** The openEO process graph to be executed. |

qa/benchmarks/tests/test_benchmarks.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@
1414
def test_run_benchmark(scenario: BenchmarkScenario, connection_factory):
1515
connection: openeo.Connection = connection_factory(url=scenario.backend)
1616

17-
# TODO: scenario option to use synchronous instead of batch job mode?
17+
# TODO #14 scenario option to use synchronous instead of batch job mode?
1818
job = connection.create_job(
1919
process_graph=scenario.process_graph,
2020
title=f"APEx benchmark {scenario.id}",
2121
)
2222

2323
job.start_and_wait()
2424

25-
# TODO download job results and inspect
25+
# TODO #5 download job results and inspect

qa/tools/apex_algorithm_qa_tools/scenarios.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@
1717

1818
@dataclasses.dataclass(kw_only=True)
1919
class BenchmarkScenario:
20-
# TODO: need for differentiation between different types of scenarios?
20+
# TODO #14 need for differentiation between different types of scenarios?
2121
id: str
2222
description: str | None = None
2323
backend: str
2424
process_graph: dict
2525

2626
@classmethod
2727
def from_dict(cls, data: dict) -> BenchmarkScenario:
28-
# TODO: standardization of these types? What about other types and how to support them?
28+
# TODO #14 standardization of these types? What about other types and how to support them?
2929
assert data["type"] == "openeo"
3030
return cls(
3131
id=data["id"],

0 commit comments

Comments
 (0)