diff --git a/packages/terratorch/benchmark_packages/test-package/pyproject.toml b/packages/terratorch/benchmark_packages/test-package/pyproject.toml new file mode 100644 index 0000000..5fdc6d4 --- /dev/null +++ b/packages/terratorch/benchmark_packages/test-package/pyproject.toml @@ -0,0 +1,11 @@ +[project] +name = "test-package" +version = "0.1.0" +description = "Custom experiment package for terratorch benchmarks" +requires-python = ">=3.10" +dependencies = [ + "orchestrator", +] + +[project.entry-points."ado.custom_experiments"] +my_experiment = "test_package.experiments" diff --git a/packages/terratorch/benchmark_packages/test-package/test_package/__init__.py b/packages/terratorch/benchmark_packages/test-package/test_package/__init__.py new file mode 100644 index 0000000..1c62e13 --- /dev/null +++ b/packages/terratorch/benchmark_packages/test-package/test_package/__init__.py @@ -0,0 +1,8 @@ +# Copyright IBM Corp. 2026 +# SPDX-License-Identifier: Apache-2.0 + +"""Test package for custom experiments.""" + +__version__ = "0.1.0" + +# Made with Bob diff --git a/packages/terratorch/benchmark_packages/test-package/test_package/experiments.py b/packages/terratorch/benchmark_packages/test-package/test_package/experiments.py new file mode 100644 index 0000000..13e8149 --- /dev/null +++ b/packages/terratorch/benchmark_packages/test-package/test_package/experiments.py @@ -0,0 +1,31 @@ +# Copyright IBM Corporation 2025, 2026 +# SPDX-License-Identifier: MIT + +"""Custom experiments for terratorch benchmarks.""" + +from typing import Any + +from orchestrator.modules.actuators.custom_experiments import custom_experiment + + +@custom_experiment(output_property_identifiers=["result"]) +def echo_experiment(input_string: str) -> dict[str, Any]: + """ + Simple custom experiment that echoes the input string. + + This is a minimal example demonstrating the structure required + by ADO (Automated Design Optimization). + + Parameters + ---------- + input_string : str + The string to echo back + + Returns + ------- + dict[str, Any] + Dictionary containing 'result' key with the input string + """ + return { + "result": input_string, + } diff --git a/packages/terratorch/models/prithvi/benchmark_instances/test_benchmark/space.yaml b/packages/terratorch/models/prithvi/benchmark_instances/test_benchmark/space.yaml new file mode 100644 index 0000000..f30613c --- /dev/null +++ b/packages/terratorch/models/prithvi/benchmark_instances/test_benchmark/space.yaml @@ -0,0 +1,13 @@ +# ADO Discovery Space Configuration for Test Benchmark +# This benchmark tests the echo_experiment custom experiment + +# Entity space defining parameter values for the benchmark +entitySpace: + - identifier: input_string + propertyDomain: + values: ["hello world", "test string", "benchmark test"] + +# List of experiments to run +experiments: + - actuatorIdentifier: custom_experiments + experimentIdentifier: echo_experiment diff --git a/packages/terratorch/models/terramind_base_fire/benchmark_instances/test_benchmark/space.yaml b/packages/terratorch/models/terramind_base_fire/benchmark_instances/test_benchmark/space.yaml new file mode 100644 index 0000000..5ad9d91 --- /dev/null +++ b/packages/terratorch/models/terramind_base_fire/benchmark_instances/test_benchmark/space.yaml @@ -0,0 +1,15 @@ +# ADO Discovery Space Configuration for Test Benchmark +# This benchmark tests the echo_experiment custom experiment + +# Entity space defining parameter values for the benchmark +entitySpace: + - identifier: input_string + propertyDomain: + values: ["hello world", "test string", "benchmark test"] + +# List of experiments to run +experiments: + - actuatorIdentifier: custom_experiments + experimentIdentifier: echo_experiment + +# Made with Bob diff --git a/packages/terratorch/nexus.yaml b/packages/terratorch/nexus.yaml index adeaede..b0a9dc6 100644 --- a/packages/terratorch/nexus.yaml +++ b/packages/terratorch/nexus.yaml @@ -1,2 +1,8 @@ package: name: terratorch + + # Register benchmark packages with custom experiments + benchmark_packages: + - requirement_specifier: "./packages/terratorch/benchmark_packages/test-package" + experiments: + - "echo_experiment"