AGE-ML is a framework for automatic generation and execution of end-to-end machine learning pipelines from explicit, human-readable specifications.
It shifts AutoML from a model-centric to a data-centric approach, enabling users to define high-level requirements and constraints for their ML workflows, including data preprocessing, feature engineering, model selection, and hyperparameter tuning.
The architecture combines symbolic reasoning with LLM-based code generation to derive admissible pipelines, synthesize implementations, execute them systematically, and preserve a traceable record of the entire process.
The workflow has three stages:
- Planning: parse a specification and enumerate valid pipeline structures.
- Execution: generate Python training code for each planned pipeline, validate it, run hyperparameter combinations, and track runs with
MLflow. - Evaluation: compare all generated models across all pipelines and pick the best overall model according to the selected metric.
ageml/planning/: planning agent and constraint solver logic.ageml/execution/: code generation, validation, execution, andMLflowintegration.ageml/evaluation/: cross-pipeline model evaluation and best-model selection.ageml/specification/: YAML parser, types, and validation logic.resources/: sample specifications and datasets.tests/: parser and specification validation tests.out/: downloaded artifacts for the best run and best pipeline.
- Python
>3.11,<4.0 - Poetry for dependency management
- API key for the configured LLM provider
The project currently instantiates ChatGoogleGenerativeAI in ageml/common/model.py,
so you should provide a valid Google API key via environment (for example in .env, initialized from .env.example).
If you don't have Poetry, install it with:
pip install -r requirements.txtThen, install the project dependencies and set up the environment with:
poetry installDownload the OpenML datasets used by experiments:
poetry run python -m experiments.download_datasetsOptional arguments:
--base_dir=<path>to choose the root output folder (default:resources/datasets). The command will create/useclassification/andregression/subfolders under that path.
Run the full workflow:
poetry run python -m ageml \
--spec_path resources/general-specification.yml \
--dataset_path resources/datasets/classification/adult.csv \
--validation_metric balanced_accuracy \
--maximize True| Parameter | Required | Default | Description |
|---|---|---|---|
spec_path |
Yes | - | Filesystem path to the YAML specification file |
dataset_path |
Yes | - | Filesystem path to the input dataset (CSV) |
validation_metric |
No | balanced_accuracy |
Metric for model selection. Supported: accuracy, balanced_accuracy, f1, precision, recall, roc_auc, mse, rmse, mae, r2 |
maximize |
No | True |
Whether to maximize (True) or minimize (False) the metric |
What this does:
- Automatically identifies the most likely target column from the dataset.
- Generates all feasible pipelines according to the provided specification.
- Sets/uses the MLflow experiment named like the dataset (for example,
adultforadult.csv). - Generates and executes code of generated pipelines in parallel processes.
- Uses MLflow to track runs, logging parameters, metrics, and artifacts.
- Evaluates models from all pipelines, compares them, and selects the best overall model.
- Downloads the selected best-run and best-pipeline artifacts into
out/.
To run the full experiments suite (all datasets in download_datasets.py):
poetry run python -m experimentsThis command:
- Downloads datasets from OpenML into
resources/datasets/classificationandresources/datasets/regression. - Runs the AutoML workflow on every dataset using
resources/general-specification.yml. - Saves a summary CSV in
experiments/results/<model_name>/results.csv.
A specification file defines:
budgets.pipelines: maximum number of planned pipelines to sample/execute (default: 20).budgets.time: runtime budget for exploration/execution scheduling. You can sethours,minutes, and/orseconds(default:minutes: 60).budgets.workers: number of execution workers used for concurrent pipeline runs (default: 5).budgets.generation_attempts: max retries per pipeline for code validation/execution loops (default: 5).pipeline.defaults: default attributes for steps (mandatory,candidates).pipeline.steps: admissible steps and candidates with parameter grids.ordering: ordering constraints (supportssequenceshorthand).constraints: conditionalrequire/forbidrules.technical_details: extra implementation requirements passed to the execution agent.
See examples:
resources/general-specification.ymlresources/adult-specification.ymlresources/housing-specification.yml
The evaluation stage compares models across all pipelines and reports the best pipeline/run based on the selected metric.
After evaluation, the framework downloads selected artifacts into:
out/best_run/: artifacts for the best hyperparameter run.out/best_pipeline/: artifacts for the best pipeline run, including generated pipeline code and explanation.
MLflow tracks parent/child runs for pipeline/hyperparameter exploration. You can view results from the mlflow ui (
mlflow server).
Using Poe tasks (configured in pyproject.toml):
poetry run poe test
poetry run poe static-checks
poetry run poe format
poetry run poe coverageThe corresponding paper of this framework is currently under review at the Future Generation Computer Systems (FGCS) journal.
Apache 2.0. See LICENSE.