Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ features.
<!-- markdownlint-disable-next-line no-duplicate-heading -->
### Requirements

The SFTTrainer actuator currently **supports only Python 3.10, 3.11, 3.12**.

[fms-hf-tuning](https://github.com/foundation-model-stack/fms-hf-tuning) imports
packages like `flash-attn` and `mamba-ssm`, which import `torch` during their
build phase. This means the base virtual environment of your Ray workers must
Expand Down
1 change: 1 addition & 0 deletions plugins/actuators/sfttrainer/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ sfttrainer_download_hf_weights = "ado_actuators.sfttrainer.scripts.download_hf_w

[project]
name="ado-sfttrainer"
requires-python = ">=3.10,<3.13"
readme = "ado_actuators/sfttrainer/README.md"
description="An actuator for benchmarking fine-tuning of foundation models" # Change to describing your actuator
dependencies=[
Expand Down
3 changes: 3 additions & 0 deletions plugins/actuators/vllm_performance/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,6 @@ dev = [
"pre-commit>=4.2.0",
"ruff>=0.12.1",
]

[tool.uv.sources]
ado-core = { workspace = true }
4 changes: 3 additions & 1 deletion plugins/custom_experiments/autoconf/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ libomp = [
"autogluon.tabular[lightgbm]"
]


[tool.hatch.build.targets.wheel]
packages = ["autoconf"]

Expand All @@ -34,6 +33,9 @@ exclude = ["build", "build.*", "yamls"]
[tool.hatch.version]
source = "uv-dynamic-versioning"

[tool.uv.sources]
ado-core = { workspace = true }

[tool.uv-dynamic-versioning]
vcs = "git"
style = "pep440"
Expand Down
46 changes: 33 additions & 13 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]

# Deps/Build-related section
dynamic = ["version"]
requires-python = ">=3.10,<3.13"
requires-python = ">=3.10,<3.14"
dependencies = [
"build>=1.3.0",
"colorlog>=6.9.0",
Expand Down Expand Up @@ -78,9 +79,18 @@ docs = [
resolution-helpers = [
"urllib3>=2.5.0",
]

# AP 2025-12-05:
# ado-sfttrainer is currently incompatible with Python 3.13
# due to a dependency on aim/aimrocks
# ado-vllm-performance is currently incompatible with macOS
# due to a new requirement in vllm>=0.11.1 which brings in
# cuda dependencies.
test = [
"ado-autoconf",
"ado-ray-tune",
"ado-sfttrainer",
"ado-sfttrainer; python_version < '3.13'",
"ado-vllm-performance; sys_platform != 'darwin'",
"anomalous-series",
"density-test",
"optimization-test-functions",
Expand All @@ -92,27 +102,37 @@ test = [
[tool.uv]
default-groups = ["dev", "docs"]

# Having our plugins in the workspace section makes it so
# that dependencies are resolved considering them as well.
# ref: https://docs.astral.sh/uv/concepts/projects/workspaces
# Plugins that we know are incompatible for certain reasons
# (e.g., Python version requirements) are commented out and
# added as path-based sources.
[tool.uv.workspace]
members = [
"plugins/actuators/sfttrainer",
"plugins/custom_experiments/autoconf",
"plugins/operators/ray_tune",
# "plugins/actuators/sfttrainer",
"plugins/actuators/vllm_performance",
"plugins/operators/anomalous_series",
"examples/density_example",
"examples/optimization_test_functions/custom_experiments",
"examples/pfas-generative-models/custom_actuator_function",
"plugins/operators/profile_space",
"plugins/operators/anomalous_series",
"plugins/actuators/example_actuator",
"examples/density_example",
]

[tool.uv.sources]
ado-sfttrainer = { workspace = true }
ado-ray-tune = { workspace = true }
optimization-test-functions = { workspace = true }
pfas-custom-functions = { workspace = true }
profile-space = { workspace = true }
anomalous-series = { workspace = true }
robotic-lab = { workspace = true }
density-test = { workspace = true }
ado-autoconf = { workspace = true, editable = true }
ado-ray-tune = { workspace = true, editable = true }
ado-sfttrainer = { path = "plugins/actuators/sfttrainer", editable = true }
ado-vllm-performance = { workspace = true, editable = true }
anomalous-series = { workspace = true, editable = true }
density-test = { workspace = true, editable = true }
optimization-test-functions = { workspace = true, editable = true }
pfas-custom-functions = { workspace = true, editable = true }
profile-space = { workspace = true, editable = true }
robotic-lab = { workspace = true, editable = true }

[project.scripts]
ado = "orchestrator.cli.core.cli:app"
Expand Down
498 changes: 443 additions & 55 deletions requirements.txt

Large diffs are not rendered by default.

9 changes: 5 additions & 4 deletions tests/actuators/test_actuators.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,16 @@ def test_custom_experiments(objectiveFunctionConfiguration, experiment_catalogs)
# - examples/optimization_test_functions/custom_experiments
# Locally this may not work because we might have more or less of these.
assert (
len(catalog.experiments) == 3
), "Expected 3 experiments in the custom_experiments catalog for testing "
len(catalog.experiments) == 4
), "Expected 4 experiments in the custom_experiments catalog for testing "

identifiers = {e.identifier for e in catalog.experiments}
assert {
"acid_test",
"calculate_density",
"min_gpu_recommender",
"nevergrad_opt_3d_test_func",
} == identifiers, f"Expected the experiments to be called - acid_test and nevergrad_opt_3d_test_func but they are called {identifiers}"
} == identifiers, f"Expected the experiments to be called - acid_test, calculate_density, min_gpu_recommender, and nevergrad_opt_3d_test_func but they are called {identifiers}"
loaded = custom_experiments.loadedExperiment.remote(
orchestrator.schema.reference.ExperimentReference(
actuatorIdentifier="custom_experiments", experimentIdentifier="acid_test"
Expand All @@ -125,7 +126,7 @@ def test_custom_experiments(objectiveFunctionConfiguration, experiment_catalogs)
"custom_experiments"
)

assert len(c.experiments) == 3
assert len(c.experiments) == 4

for e in c.experiments:
assert catalog.experimentForReference(e.reference) is not None
Expand Down
8 changes: 4 additions & 4 deletions tests/ado/create/test_ado_create_actuator_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

def test_create_actuator_configuration_dry_run_success(tmp_path: pathlib.Path):
actuator_configuration_file = (
"tests/resources/actuatorconfiguration/sfttrainer.yaml"
"tests/resources/actuatorconfiguration/robotic_lab.yaml"
)
runner = CliRunner()
result = runner.invoke(
Expand All @@ -36,12 +36,12 @@ def test_create_actuator_configuration_dry_run_success(tmp_path: pathlib.Path):

def test_create_actuator_configuration_dry_run_failure(tmp_path: pathlib.Path):
actuator_configuration_file = pathlib.Path(
"tests/resources/actuatorconfiguration/sfttrainer.yaml"
"tests/resources/actuatorconfiguration/robotic_lab.yaml"
)

invalid_actuator_configuration_file = tmp_path / "invalid.yaml"
actuator_configuration = yaml.safe_load(actuator_configuration_file.read_text())
actuator_configuration["actuatorIdentifier"] = "SFTTrainer-fake"
actuator_configuration["actuatorIdentifier"] = "robotic-lab-fake"
invalid_actuator_configuration_file.write_text(
yaml.safe_dump(actuator_configuration)
)
Expand Down Expand Up @@ -70,7 +70,7 @@ def test_create_actuator_configuration(
tmp_path: pathlib.Path, valid_ado_project_context, create_active_ado_context
):
actuator_configuration_file = (
"tests/resources/actuatorconfiguration/sfttrainer.yaml"
"tests/resources/actuatorconfiguration/robotic_lab.yaml"
)

runner = CliRunner()
Expand Down
10 changes: 7 additions & 3 deletions tests/ado/create/test_ado_create_discovery_space.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,9 @@ def test_create_discovery_space_success(
def test_create_discovery_space_success_new_sample_store(
tmp_path: pathlib.Path, valid_ado_project_context, create_active_ado_context
):
space_configuration_file = pathlib.Path("tests/resources/space/sfttrainer.yaml")
space_configuration_file = pathlib.Path(
"plugins/actuators/example_actuator/yamls/discoveryspace.yaml"
)
runner = CliRunner()
create_active_ado_context(
runner=runner, path=tmp_path, project_context=valid_ado_project_context
Expand All @@ -187,7 +189,7 @@ def test_create_discovery_space_success_new_sample_store(
assert result.exit_code == 0
expected_output = (
"INFO: A new sample store was requested.\n"
" Sample store replace-me referenced in the space definition will be ignored.\n"
" Sample store a267f0 referenced in the space definition will be ignored.\n"
"Success! Created space with identifier:"
)
assert result.output.startswith(expected_output)
Expand All @@ -196,7 +198,9 @@ def test_create_discovery_space_success_new_sample_store(
def test_create_discovery_space_success_with_latest_samplestore(
tmp_path: pathlib.Path, valid_ado_project_context, create_active_ado_context
):
space_configuration_file = pathlib.Path("tests/resources/space/sfttrainer.yaml")
space_configuration_file = pathlib.Path(
"plugins/actuators/example_actuator/yamls/discoveryspace.yaml"
)
runner = CliRunner()
create_active_ado_context(
runner=runner, path=tmp_path, project_context=valid_ado_project_context
Expand Down
9 changes: 9 additions & 0 deletions tests/resources/actuatorconfiguration/robotic_lab.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Copyright (c) IBM Corporation
# SPDX-License-Identifier: MIT
actuatorIdentifier: robotic_lab
metadata:
description: null
labels: null
name: null
parameters:
my_parameter: hello world
5 changes: 3 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist: {py37,py38,py39,p310,p311,p312}-{deploy,test}-{pipfile,pipenv}-{intel,applesilicon}{,-extras,-optimizers}
envlist: {p310,p311,p312,p313}-{deploy,test}-{pipfile,pipenv}-{intel,applesilicon}{,-extras,-optimizers}
#This is a hack to force pip to serialise installs
#i.e. install a set of packages before installing the next
#This happens particularly with numpy which MUST be installed
Expand All @@ -22,6 +22,7 @@ basepython=
py310: python3.10
py311: python3.11
py312: python3.12
py313: python3.13
passenv=
CI
setenv=
Expand Down Expand Up @@ -50,7 +51,7 @@ commands=
uv pip list
pytest -n auto --dist worksteal -rx -vv --log-level=INFO --color=yes tests/
# Run the SFTTrainer tests
pytest -n auto --dist worksteal -rx -vv --log-level=INFO --color=yes plugins/actuators/sfttrainer/ado_actuators/sfttrainer/tests/
!py313: pytest -n auto --dist worksteal -rx -vv --log-level=INFO --color=yes plugins/actuators/sfttrainer/ado_actuators/sfttrainer/tests/
# Basic test of custom experiment examples
ado describe experiment calculate_density
run_experiment examples/density_example/point.yaml
Expand Down
Loading