### Install and Run TabArena Quickstart Source: https://github.com/autogluon/tabarena/blob/main/README.md Commands to set up the environment using uv and execute the TabArena quickstart script. ```bash pip install uv git clone https://github.com/autogluon/tabarena.git && cd tabarena uv venv --seed --python 3.12 && source .venv/bin/activate uv pip install --prerelease=allow -e "./packages/tabarena[benchmark]" python examples/benchmarking/run_quickstart_tabarena.py ``` -------------------------------- ### Install and Run BeyondArena Quickstart Source: https://github.com/autogluon/tabarena/blob/main/examples/beyondarena/README.md Commands to install the benchmark package and execute the quickstart script for evaluating models on the BeyondArena core subset. ```bash uv pip install --prerelease=allow -e "./packages/tabarena[benchmark]" python examples/beyondarena/run_quickstart_beyondarena.py ``` -------------------------------- ### Launch TabRepo HPO Experiments with Syne Tune Source: https://github.com/autogluon/tabarena/blob/main/tabrepo.md Example script to get started with launching HPO experiments on TabRepo using Syne Tune's wrapper. This simulates methods like random-search or Bayesian optimization. ```python examples/launch_tabrepo.py ``` -------------------------------- ### Install TabArena Source: https://github.com/autogluon/tabarena/blob/main/_autodocs/INDEX.md Clone the repository and install dependencies using uv. ```bash git clone https://github.com/autogluon/tabarena.git cd tabarena uv venv --seed --python 3.12 && source .venv/bin/activate uv pip install --prerelease=allow -e "./packages/tabarena[benchmark]" ``` -------------------------------- ### Clone and Setup Virtual Environment Source: https://github.com/autogluon/tabarena/blob/main/README.md Initial setup steps to clone the repository and initialize a virtual environment using uv. ```bash git clone https://github.com/autogluon/tabarena.git cd tabarena uv venv --seed --python 3.12 source .venv/bin/activate ``` -------------------------------- ### Install Benchmark Package Source: https://github.com/autogluon/tabarena/blob/main/README.md Installs the core set of models required for standard benchmarking. ```bash uv pip install --prerelease=allow -e "./packages/tabarena[benchmark]" ``` -------------------------------- ### Install tabflow_slurm and dependencies Source: https://github.com/autogluon/tabarena/blob/main/packages/tabflow_slurm/README.md Install the required packages from the repository root using uv. ```bash uv pip install --prerelease=allow -e "./packages/tabarena[benchmark]" # tabarena + model fitting uv pip install -e ./packages/tabflow_slurm # this package ``` -------------------------------- ### BeyondArena Evaluation Usage Example Source: https://github.com/autogluon/tabarena/blob/main/_autodocs/api-reference/evaluation.md Example demonstrating how to instantiate the configuration and execute the evaluation process. ```python from tabarena.evaluation import BeyondArenaEvalConfig, BenchmarkRun, run_beyond_arena_eval config = BeyondArenaEvalConfig( benchmark_runs=[ BenchmarkRun( benchmark_name="beyondarena_iid", output_dir="/path/to/iid/output", methods=["TabPFN", "LightGBM"], ), BenchmarkRun( benchmark_name="beyondarena_temporal", output_dir="/path/to/temporal/output", methods=["TabPFN", "LightGBM"], ), ], figure_output_dir="/path/to/figures", subsets=[ ["iid"], ["temporal"], ["grouped"], ], ) leaderboards = run_beyond_arena_eval(config) ``` -------------------------------- ### Install Pre-commit Hooks Source: https://github.com/autogluon/tabarena/blob/main/AGENTS.md One-time setup to automatically run linting and formatting checks during git commits. ```bash pip install pre-commit && pre-commit install # one-time, per clone ``` -------------------------------- ### Evaluation workflow example Source: https://github.com/autogluon/tabarena/blob/main/_autodocs/api-reference/evaluation.md Demonstrates configuring the evaluation, running it, and iterating through the resulting leaderboards. ```python from tabarena.evaluation import TabArenaEvalConfig, EvalMethod, run_eval from pathlib import Path config = TabArenaEvalConfig( benchmark_name="tabarena_main", output_dir="/path/to/benchmark/output", methods=[ EvalMethod(name="RandomForest"), EvalMethod( name="LightGBM_custom", result_suffix=" [Rerun]", ), ], figure_output_dir="/path/to/output/figures", subsets=[ [], # Full benchmark ["regression"], ["binary"], ], ) leaderboards = run_eval(config) for subset_label, df in leaderboards.items(): print(f"\n{subset_label}:") print(df.head()) ``` -------------------------------- ### Developer Environment Setup Source: https://github.com/autogluon/tabarena/blob/main/README.md Commands to set up a workspace for editable development of both AutoGluon and TabArena. ```bash uv venv --seed --python 3.12 .venv source .venv/bin/activate ``` ```bash git clone https://github.com/autogluon/autogluon.git ./autogluon/full_install.sh git clone https://github.com/autogluon/tabarena.git uv pip install --prerelease=allow -e "./tabarena/packages/tabarena[benchmark]" ``` -------------------------------- ### Install Extended Benchmark Packages Source: https://github.com/autogluon/tabarena/blob/main/README.md Installs the core benchmark set plus experimental extended models, or specific individual models. ```bash uv pip install --prerelease=allow -e "./packages/tabarena[benchmark,extended]" ``` ```bash uv pip install --prerelease=allow -e "./packages/tabarena[benchmark,xrfm]" ``` -------------------------------- ### Run Experiment Example Source: https://github.com/autogluon/tabarena/blob/main/_autodocs/api-reference/experiment.md Demonstrates creating an AutoGluon-based experiment and running it on a task. ```python from tabarena.benchmark.experiment import Experiment, AGModelExperiment from tabarena.benchmark.exec_models.autogluon import AGWrapper from tabarena.benchmark.task import UserTask # Create an experiment for LightGBM via AutoGluon experiment = AGModelExperiment( name="LightGBM_v1", model_cls="LightGBM", ag_args_fit={ "num_leaves": 31, "learning_rate": 0.05, }, ) # Load a task task = UserTask.from_task_id_str("tabarena|123456|r0f0") # Run the experiment on the first fold result = experiment.run(task, fold=0) print(f"Test error: {result['metric_error']:.4f}") print(f"Fit time (seconds): {result['fit_time']:.2f}") ``` -------------------------------- ### Configure and setup SLURM jobs Source: https://github.com/autogluon/tabarena/blob/main/packages/tabflow_slurm/README.md Define a TabArenaBenchmarkPlan and call setup_jobs to generate sbatch commands. ```python from tabarena.benchmark.experiment import TabArenaV0pt1ExperimentBundle from tabarena.benchmark.task.metadata import TaskSubset from tabarena.contexts.tabarena.context import TabArenaContext from tabflow_slurm import ( GCPSlurmSetup, ModelJob, PathSetup, TabArenaBenchmarkPlan, TabArenaV0pt1ResourcesSetup, ) plan = TabArenaBenchmarkPlan( benchmark_name="my_benchmark_2026", model_jobs=[ ModelJob(models=("TabPFN-3", 0), name="gpu", resources={"num_gpus": 1}), # GPU model ModelJob(models=("Linear", 1), name="cpu"), # CPU model, 1 random config ], context=TabArenaContext(), # owns the tasks + subset predicates (from tabarena) task_subset=TaskSubset(subset="lite"), # typed scope for context.build_jobs (first split only) experiment_bundle=TabArenaV0pt1ExperimentBundle(), # how to build the models (from tabarena) path_setup=PathSetup(workspace="/shared/workspace", python_path="/shared/venv/bin/python"), resources_setup=TabArenaV0pt1ResourcesSetup(), scheduler_setup=GCPSlurmSetup(), ) plan.setup_jobs() # prints the sbatch command(s) to launch ``` -------------------------------- ### Initialize BenchmarkRun Instances Source: https://github.com/autogluon/tabarena/blob/main/_autodocs/api-reference/evaluation.md Examples of initializing BenchmarkRun objects with different configurations for benchmark names, output paths, and method filtering. ```python from tabarena.evaluation import BenchmarkRun run1 = BenchmarkRun( benchmark_name="beyondarena_main", output_dir="/path/to/run1", methods=["TabPFN", "LightGBM"], ) run2 = BenchmarkRun( benchmark_name="beyondarena_extended", output_dir="/path/to/run2", result_suffix=" [Extended Set]", ) ``` -------------------------------- ### AGModelExperiment Usage Source: https://github.com/autogluon/tabarena/blob/main/_autodocs/api-reference/experiment.md Example of initializing an AGModelExperiment with specific hyperparameters and a time limit. ```python from tabarena.benchmark.experiment import AGModelExperiment exp = AGModelExperiment( name="XGBoost_base", model_cls="XGBoost", ag_args_fit={ "max_depth": 6, "eta": 0.1, }, time_limit=600, ) ``` -------------------------------- ### Models Usage Example Source: https://github.com/autogluon/tabarena/blob/main/_autodocs/api-reference/models.md Demonstrates discovering models, accessing the registry, and retrieving specific model information. ```python from tabarena.models import get_model_registry, discover_models # Discover all models (called automatically) models = discover_models() print(f"Discovered {len(models)} models") # Get the registry registry = get_model_registry() # Check if a model is registered if "TabPFN" in registry: model_info = registry["TabPFN"] print(f"TabPFN: {model_info.name}") ``` -------------------------------- ### AGExperiment Usage Example Source: https://github.com/autogluon/tabarena/blob/main/_autodocs/api-reference/experiment.md Demonstrates initializing an AGExperiment with explicit parameters and reconstructing one from a YAML dictionary. ```python from tabarena.benchmark.experiment import AGExperiment # Create from explicit parameters ag_exp = AGExperiment( name="LightGBM_HPO", model_cls="LightGBM", ag_args_fit={ "num_leaves": 63, "learning_rate": 0.02, "bagging_freq": 5, }, preprocessing_pipeline="tabarena_default", ) # Or reconstruct from YAML yaml_dict = { "name": "LightGBM_HPO", "model_cls": "LightGBM", "ag_args_fit": {"num_leaves": 63}, } exp_from_yaml = AGExperiment.from_yaml(yaml_dict) ``` -------------------------------- ### Install TabRepo Source: https://github.com/autogluon/tabarena/blob/main/tabrepo.md Clone the repository and install the package in editable mode. Requires Python 3.9-3.11. ```bash git clone https://github.com/autogluon/tabrepo.git pip install -e tabrepo/ ``` -------------------------------- ### TabDPT-Turbo Benchmark Setup Source: https://github.com/autogluon/tabarena/blob/main/packages/tabflow_slurm/BENCHMARK_LOG.md Configuration for the TabArena-v0.1 benchmark of TabDPT-Turbo using a GCP SLURM partition. ```python from tabarena.benchmark.experiment import TabArenaV0pt1ExperimentBundle from tabarena.benchmark.task.metadata import TaskSubset from tabarena.contexts import TabArenaContext from tabflow_slurm import ( GCPSlurmSetup, ModelJob, PathSetup, TabArenaBenchmarkPlan, TabArenaV0pt1ResourcesSetup, ) benchmark_plan = TabArenaBenchmarkPlan( benchmark_name="tabdptturbo_10072026", model_jobs=[ ModelJob( models=("TabDPT-Turbo", 0), name="gpu", resources={"num_gpus": 1}, ), ], context=TabArenaContext(), task_subset=TaskSubset(), # full task set (all splits) experiment_bundle=TabArenaV0pt1ExperimentBundle(model_verbosity=2), path_setup=PathSetup( workspace="/home/lennart_priorlabs_ai/workspace/benchmarking/tabarena_workspace", python_path="/home/lennart_priorlabs_ai/.venvs/tabarena_18062026/bin/python", ), resources_setup=TabArenaV0pt1ResourcesSetup(num_cpus=None, memory_limit=None), scheduler_setup=GCPSlurmSetup(gpu_partition="gpurtxpro6000spotinteractive", bundle_size=1), ) benchmark_plan.setup_jobs() ``` -------------------------------- ### AGModelBagExperiment Usage Source: https://github.com/autogluon/tabarena/blob/main/_autodocs/api-reference/experiment.md Example of initializing an AGModelBagExperiment with ensemble configuration settings. ```python from tabarena.benchmark.experiment import AGModelBagExperiment exp = AGModelBagExperiment( name="LightGBM_BAG", model_cls="LightGBM", ag_args_fit={ "num_leaves": 127, }, ag_args_ensemble={ "num_bag_folds": 5, "num_bag_sets": 10, }, ) ``` -------------------------------- ### Usage of ExternalSystemExperiment Source: https://github.com/autogluon/tabarena/blob/main/_autodocs/api-reference/experiment.md Example of instantiating an experiment for an external system. ```python from tabarena.benchmark.experiment import ExternalSystemExperiment exp = ExternalSystemExperiment( name="AutoML_System_v2", command="python /path/to/external_system.py", ) ``` -------------------------------- ### Run experiment with OOF collection Source: https://github.com/autogluon/tabarena/blob/main/_autodocs/api-reference/experiment-runner.md Example demonstrating how to initialize and run an experiment with OOF data collection enabled. ```python from tabarena.benchmark.experiment.experiment_runner import OOFExperimentRunner from pathlib import Path # Run with OOF collection result = OOFExperimentRunner.init_and_run( method_cls=AGWrapper, task=task, fold=0, task_name="iris", method="LightGBM", fit_args={"num_leaves": 31}, oof_dir=Path("/path/to/oof"), ) # OOF predictions are saved for ensemble workflows print(f"OOF artifact saved: {result['oof_path']}") ``` -------------------------------- ### Install Evaluation Package Source: https://github.com/autogluon/tabarena/blob/main/README.md Installs the evaluation-only package for leaderboards and metrics without model-fitting dependencies. ```bash uv pip install --prerelease=allow -e "./packages/tabarena[plot]" ``` -------------------------------- ### Install TabArena packages via uv Source: https://github.com/autogluon/tabarena/blob/main/AGENTS.md Commands to install the core package and optional extras using uv. Requires Python 3.11–3.13 and pre-release AutoGluon support. ```bash uv pip install --prerelease=allow -e "./packages/tabarena" # Minimal: evaluation/leaderboard/metrics only uv pip install --prerelease=allow -e "./packages/tabarena[plot]" # + leaderboard/result plotting uv pip install --prerelease=allow -e "./packages/tabarena[text]" # + semantic text features (sentence-transformers; pulls torch) uv pip install --prerelease=allow -e "./packages/tabarena[preprocessing]" # + skrub datetime/statistical-text feature generators uv pip install --prerelease=allow -e "./packages/tabarena[benchmark]" # Full install (models + plot + text + preprocessing) ``` -------------------------------- ### Initialize and use TabArenaTaskMetadata Source: https://github.com/autogluon/tabarena/blob/main/_autodocs/types.md Example showing the instantiation of task metadata and conversion to a DataFrame. ```python from tabarena.benchmark.task.metadata import TabArenaTaskMetadata, SplitMetadata metadata = TabArenaTaskMetadata( dataset_name="iris", problem_type="multiclass", is_classification=True, target_name="species", eval_metric="accuracy", splits_metadata={ "r0f0": SplitMetadata( num_instances_train=120, num_instances_test=30, num_classes_in_split=3, ), }, num_instances=150, num_features=4, num_classes=3, num_instance_groups=150, stratify_on="species", time_on=None, group_on=None, group_time_on=None, group_labels=None, multiclass_min_n_classes_over_splits=3, multiclass_max_n_classes_over_splits=3, class_consistency_over_splits=True, tabarena_task_name="Iris Classification", task_id_str="tabarena|123456|r0f0", ) # Convert to DataFrame for analysis df = metadata.to_dataframe() ``` -------------------------------- ### Setup TabICLv2 Benchmark Job Source: https://github.com/autogluon/tabarena/blob/main/packages/tabflow_slurm/BENCHMARK_LOG.md Configures a benchmark job for the TabICLv2 foundation model on the H200 partition with simulated memory. ```python BenchmarkSetup( benchmark_name="tabpicl_v2_14022026", models=[ ("TabICLv2", 0), ], num_gpus=1, configs_per_job=1, slurm_gpu_partition="alldlc2_gpu-h200", fake_memory_for_estimates=140, ).setup_jobs() ``` -------------------------------- ### Paths Utility Usage Source: https://github.com/autogluon/tabarena/blob/main/_autodocs/api-reference/loaders.md Example demonstrating directory access and path conversion using the Paths class. ```python from tabarena.loaders import Paths from pathlib import Path # Access project directories print(f"Project root: {Paths.project_root}") print(f"Data root: {Paths.data_root}") print(f"Cache roots:") print(f" Raw: {Paths.data_root_cache_raw}") print(f" Processed: {Paths.data_root_cache_processed}") print(f" Results: {Paths.results_root_cache_tabarena}") # Convert paths abs_path = "/workspace/home/tabarena/packages/tabarena/data/my_file.csv" rel_path = Paths.abs_to_rel(abs_path) print(f"Relative: {rel_path}") # Convert back abs_again = Paths.rel_to_abs(rel_path) print(f"Absolute: {abs_again}") ``` -------------------------------- ### Setup LimiX Benchmark Job Source: https://github.com/autogluon/tabarena/blob/main/packages/tabflow_slurm/BENCHMARK_LOG.md Configures a benchmark job for the LimiX model on the H200 partition with a 4-hour time limit. ```python BenchmarkSetup( benchmark_name="limix_11052026", models=[ ("LimiX", 0), ], num_gpus=1, configs_per_job=1, slurm_gpu_partition="alldlc2_gpu-h200", fake_memory_for_estimates=140, time_limit=60 * 60 * 4, ).setup_jobs() ``` -------------------------------- ### Install TabArena with AutoGluon development Source: https://github.com/autogluon/tabarena/blob/main/AGENTS.md Commands for setting up an editable development environment alongside the AutoGluon repository. ```bash ../autogluon/full_install.sh uv pip install --prerelease=allow -e "./packages/tabarena[benchmark]" ``` -------------------------------- ### Install TabRepo 2.0 Dependencies Source: https://github.com/autogluon/tabarena/blob/main/tabrepo.md Install dependencies for TabRepo 2.0, requiring the latest AutoGluon mainline or 1.3+. Includes benchmark extras. ```bash # Requires latest mainline AutoGluon (or AutoGluon 1.3+) git clone https://github.com/autogluon/autogluon ./autogluon/full_install.sh git clone https://github.com/autogluon/tabrepo.git pip install -e tabrepo/[benchmark] ``` -------------------------------- ### Setup PerpetualBooster Benchmark Job Source: https://github.com/autogluon/tabarena/blob/main/packages/tabflow_slurm/BENCHMARK_LOG.md Configures a CPU-based benchmark job for the PerpetualBooster model with a 4-hour time limit. ```python BenchmarkSetup( benchmark_name="perpetual_booster_25022026", models=[ ("PerpetualBooster", 5), ], configs_per_job=1, time_limit=60 * 60 * 4, ).setup_jobs() ``` -------------------------------- ### UserTask Usage Examples Source: https://github.com/autogluon/tabarena/blob/main/_autodocs/api-reference/task.md Demonstrates creating a custom task from local data splits or loading a curated task by ID. ```python from tabarena.benchmark.task import UserTask, Split import pandas as pd # Option 1: Create a custom task from data splits X_train = pd.DataFrame({"feature_1": [1, 2, 3], "feature_2": [4, 5, 6]}) y_train = pd.Series([0, 1, 0], name="target") X_test = pd.DataFrame({"feature_1": [7, 8], "feature_2": [9, 10]}) y_test = pd.Series([1, 0], name="target") split = Split(X_train=X_train, y_train=y_train, X_test=X_test, y_test=y_test) task = UserTask( splits=[split], problem_type="binary", target_name="target", dataset_name="my_dataset", ) # Option 2: Load a curated TabArena task task = UserTask.from_task_id_str("tabarena|123456|r0f0") # Use the task X_train, y_train, X_test, y_test = task.get_split_train_test(fold=0) print(f"Train shape: {X_train.shape}, Test shape: {X_test.shape}") ``` -------------------------------- ### ExperimentRunner Usage Example Source: https://github.com/autogluon/tabarena/blob/main/_autodocs/api-reference/experiment-runner.md Demonstrates loading a task and running an experiment using the ExperimentRunner class. ```python from tabarena.benchmark.experiment.experiment_runner import ExperimentRunner from tabarena.benchmark.task import UserTask from tabarena.benchmark.exec_models.autogluon import AGWrapper # Load a task task = UserTask.from_task_id_str("tabarena|123456|r0f0") # Create and run a single experiment result = ExperimentRunner.init_and_run( method_cls=AGWrapper, task=task, fold=0, task_name="iris", method="LightGBM", fit_args={"num_leaves": 31}, debug_mode=True, ) print(f"Test error: {result['metric_error']:.4f}") print(f"Fit time: {result['fit_time']:.2f}s") print(f"Inference time: {result['infer_time']:.4f}s") print(f"Memory (peak): {result['memory_peak_mb']:.1f} MB") ``` -------------------------------- ### Initialize and Use InMemoryTaskWrapper Source: https://github.com/autogluon/tabarena/blob/main/_autodocs/api-reference/task.md Example demonstrating how to instantiate the wrapper with synthetic data and retrieve a specific train/test split. ```python from tabarena.benchmark.task import InMemoryTaskWrapper import numpy as np import pandas as pd X = pd.DataFrame({ "feature_1": np.random.randn(100), "feature_2": np.random.randn(100), }) y = pd.Series(np.random.randint(0, 2, 100), name="target") task = InMemoryTaskWrapper( X=X, y=y, problem_type="binary", label="target", ) X_train, y_train, X_test, y_test = task.get_split_train_test(fold=0) ``` -------------------------------- ### Setup TabSTAR Benchmark Job Source: https://github.com/autogluon/tabarena/blob/main/packages/tabflow_slurm/BENCHMARK_LOG.md Configures a benchmark job for the TabSTAR foundation model with model-agnostic preprocessing disabled. ```python BenchmarkSetup( benchmark_name="tabstar_31012026", models=[ ("TabSTAR", 25), ], num_gpus=1, configs_per_job=5, model_agnostic_preprocessing=False, ).setup_jobs() ``` -------------------------------- ### Compare BeyondArena Task Subsets Source: https://github.com/autogluon/tabarena/blob/main/_autodocs/api-reference/contexts.md Example demonstrating how to iterate through different task types and size buckets to generate leaderboards using the BeyondArenaContext. ```python from tabarena.contexts import BeyondArenaContext # Create context context = BeyondArenaContext() # Compare on different task types for task_type in ["iid", "temporal", "grouped"]: leaderboard = context.compare( output_dir=f"/path/to/output/{task_type}", subset=[task_type], ) print(f"\n{task_type.upper()}:") print(leaderboard.head()) # Compare across size buckets for size_bucket in ["small", "medium", "large"]: leaderboard = context.compare( output_dir=f"/path/to/output/{size_bucket}", subset=[size_bucket], ) print(f"\n{size_bucket.upper()}:") print(leaderboard.head()) ``` -------------------------------- ### Setup TabPFN-2.6 Benchmark Job Source: https://github.com/autogluon/tabarena/blob/main/packages/tabflow_slurm/BENCHMARK_LOG.md Configures a benchmark job for the TabPFN-2.6 model on the H200 partition with a 2-hour time limit. ```python BenchmarkSetup( benchmark_name="250326_tabpfnv26", models=[ ("TabPFN-2.6", 0), ], num_gpus=1, configs_per_job=1, slurm_gpu_partition="alldlc2_gpu-h200", fake_memory_for_estimates=140, time_limit=60 * 60 * 2, ).setup_jobs() ``` -------------------------------- ### Cache Management Usage Source: https://github.com/autogluon/tabarena/blob/main/_autodocs/api-reference/loaders.md Example showing how to retrieve, override, and reset the TabArena cache root. ```python from tabarena.loaders import get_tabarena_cache_root, set_tabarena_cache_root from pathlib import Path # Use environment variable or default cache_root = get_tabarena_cache_root() print(f"Cache at: {cache_root}") # Override at runtime set_tabarena_cache_root("/mnt/large_disk/tabarena_cache") cache_root = get_tabarena_cache_root() print(f"Cache now at: {cache_root}") # Clear the override (revert to env var or default) set_tabarena_cache_root(None) ``` -------------------------------- ### Setup AutoGluon Benchmark Job Source: https://github.com/autogluon/tabarena/blob/main/packages/tabflow_slurm/BENCHMARK_LOG.md Configures a benchmark job for AutoGluon extreme presets with a 4-hour time limit and lite mode enabled. ```python BenchmarkSetup( benchmark_name="ag_experiment_191225", models=[ ( "AutoGluon_extreme_v150_4h", dict( fit_kwargs=dict( presets="https://ag-presets.s3.us-west-2.amazonaws.com/presets/extreme_v150.yaml", ), ), ), ( "AutoGluon_extreme_noncommercial_v150_4h", dict( fit_kwargs=dict( presets="https://ag-presets.s3.us-west-2.amazonaws.com/presets/extreme_noncommercial_v150.yaml", ), ), ), ], num_gpus=1, time_limit=14400, configs_per_job=1, tabarena_lite=True, ).setup_jobs() ``` -------------------------------- ### TaskSpec Usage Example Source: https://github.com/autogluon/tabarena/blob/main/_autodocs/api-reference/task.md Demonstrates parsing a task ID string and manual instantiation of TaskSpec. ```python from tabarena.benchmark.task import TaskSpec, task_spec_from_task_id_str # Parse from string spec = task_spec_from_task_id_str("tabarena|123456|r0f0") # Or create directly spec = TaskSpec( task_id_str="tabarena|123456|r0f0", source="tabarena", problem_type="binary", ) ``` -------------------------------- ### Setup TabPFN-3 Benchmark Jobs Source: https://github.com/autogluon/tabarena/blob/main/packages/tabflow_slurm/BENCHMARK_LOG.md Configures SLURM jobs for the TabPFN-3 model on the H200 partition with a 2-hour time limit. ```python BenchmarkSetup( benchmark_name="benchmark_tabpfn_3_11052026", models=[ ("TabPFN-3", 0), ], num_gpus=1, configs_per_job=1, slurm_gpu_partition="alldlc2_gpu-h200", fake_memory_for_estimates=140, time_limit=60 * 60 * 2, ).setup_jobs() ``` -------------------------------- ### Reproduce AutoML Conf 2024 Paper Experiments Source: https://github.com/autogluon/tabarena/blob/main/tabrepo.md Install extra dependencies for reproducing paper experiments, including AG benchmark and other Python packages. ```bash # Install AG benchmark, required only to reproduce results showing win-rate tables git clone https://github.com/autogluon/autogluon-bench.git pip install -e autogluon-bench/ git clone https://github.com/Innixma/autogluon-benchmark.git pip install -e autogluon-benchmark/ # Install extra dependencies used for results scripts pip install autorank seaborn ``` -------------------------------- ### Setup iLTM Benchmark Jobs Source: https://github.com/autogluon/tabarena/blob/main/packages/tabflow_slurm/BENCHMARK_LOG.md Configures and initializes SLURM jobs for the iLTM foundation model with a 1-hour time limit. ```python from tabflow_slurm.setup_slurm_base import BenchmarkSetup BenchmarkSetup( benchmark_name="benchmark_iltm_14052026", models=[ ("iLTM", 25), ], num_gpus=1, configs_per_job=1, time_limit=60 * 60 * 1, ).setup_jobs() ``` -------------------------------- ### Setup OrionMSP Benchmark Jobs Source: https://github.com/autogluon/tabarena/blob/main/packages/tabflow_slurm/BENCHMARK_LOG.md Configures SLURM jobs for the OrionMSP model on the H200 partition with specific memory estimates and problem type filtering. ```python BenchmarkSetup( benchmark_name="benchmark_orionmsp_14052026", models=[ ("OrionMSP", 0), ], num_gpus=1, configs_per_job=1, slurm_gpu_partition="alldlc2_gpu-h200", fake_memory_for_estimates=140, time_limit=60 * 60 * 2, problem_types_to_run=["binary", "multiclass"], ).setup_jobs() ``` -------------------------------- ### Initialize EvalMethod Instances Source: https://github.com/autogluon/tabarena/blob/main/_autodocs/api-reference/evaluation.md Demonstrates creating a list of EvalMethod objects with various configurations. ```python from tabarena.evaluation import EvalMethod methods = [ EvalMethod(name="TabPFN"), EvalMethod(name="LightGBM", result_suffix=" [HPO v2]"), EvalMethod( name="CustomSystem", ag_name_override="custom_impl", result_suffix=" [Experimental]", ), ] ``` -------------------------------- ### Initialize and Use TabArenaContext Source: https://github.com/autogluon/tabarena/blob/main/_autodocs/api-reference/contexts.md Demonstrates creating a context, registering custom methods, and generating leaderboards for the full benchmark or specific subsets. ```python from tabarena.contexts import TabArenaContext from pathlib import Path # Create context with paper baselines context = TabArenaContext() # Register additional methods from a custom run from tabarena.evaluation import EvalMethod context = TabArenaContext( extra_methods=[ MethodMetadata( suite="tabarena_main", date="2025-06-15", cache_type="results", cache_kwargs={}, verified=True, ), ], ) # Generate full leaderboard leaderboard = context.compare( output_dir="/path/to/output", subset=None, # Full benchmark ) print(leaderboard) # Generate subset leaderboards for subset_name, subset_spec in [ ("Binary", ["binary"]), ("Regression", ["regression"]), ("Small Datasets", ["small"]), ]: lb = context.compare( output_dir=f"/path/to/output/{subset_name.lower()}", subset=subset_spec, ) print(f"\n{subset_name}:") print(lb.head()) ``` -------------------------------- ### discover_models Source: https://github.com/autogluon/tabarena/blob/main/_autodocs/api-reference/models.md Scans installed packages to auto-discover and register model metadata. ```APIDOC ## discover_models ### Description Scans installed model packages for metadata files and registers them. This is typically called automatically on first import. ### Signature `def discover_models() -> dict[str, ModelInfo]` ### Returns - **dict[str, ModelInfo]**: A dictionary of all discovered models. ``` -------------------------------- ### Discover Models Source: https://github.com/autogluon/tabarena/blob/main/_autodocs/api-reference/models.md Scans installed packages for model metadata and populates the registry. ```python def discover_models() -> dict[str, ModelInfo] ``` -------------------------------- ### Get subsets to run Source: https://github.com/autogluon/tabarena/blob/main/_autodocs/api-reference/evaluation.md Retrieves the list of subset specifications for the current evaluation. ```python def subsets_to_run(self) -> list[list[str]] ``` -------------------------------- ### Create and run an experiment Source: https://github.com/autogluon/tabarena/blob/main/_autodocs/README.md Instantiate an AGModelExperiment with specific model arguments and execute it on a task for a given fold. ```python exp = AGModelExperiment( name="LightGBM_v1", model_cls="LightGBM", ag_args_fit={"num_leaves": 31}, ) result = exp.run(task, fold=0) ``` -------------------------------- ### Initialize caches method Source: https://github.com/autogluon/tabarena/blob/main/_autodocs/api-reference/evaluation.md Configures cache paths for TabArena, OpenML, and HuggingFace resources. ```python def init_caches(self) -> None ``` -------------------------------- ### Convert scikit-learn splits usage Source: https://github.com/autogluon/tabarena/blob/main/_autodocs/api-reference/task.md Example of converting a StratifiedKFold splitter into TabArena task splits. ```python from tabarena.benchmark.task import from_sklearn_splits_to_user_task_splits, UserTask from sklearn.model_selection import StratifiedKFold import pandas as pd X = pd.DataFrame({"f1": [1, 2, 3, 4], "f2": [5, 6, 7, 8]}) y = pd.Series([0, 1, 0, 1], name="target") splitter = StratifiedKFold(n_splits=2) splits = from_sklearn_splits_to_user_task_splits( X, y, problem_type="binary", target_name="target", dataset_name="my_data", cv_splitter=splitter, ) task = UserTask( splits=splits, problem_type="binary", target_name="target", dataset_name="my_data", ) ``` -------------------------------- ### Experiment.__init__ Source: https://github.com/autogluon/tabarena/blob/main/_autodocs/api-reference/experiment.md Initializes a new Experiment instance with a specific method class and configuration. ```APIDOC ## Constructor: Experiment.__init__ ### Description Initializes the experiment runner with the specified model class and configuration parameters. ### Parameters - **name** (str) - Required - Descriptive, unique name of the experiment. - **method_cls** (type[AbstractExecModel]) - Required - The method class to be fit and evaluated. - **method_kwargs** (dict) - Required - Keyword arguments for the method_cls. - **experiment_cls** (type[ExperimentRunner]) - Optional - The runner class (default: OOFExperimentRunner). - **experiment_kwargs** (dict) - Optional - Keyword arguments for the experiment_cls. - **preprocessing_pipeline** (str) - Optional - Name of the preprocessing pipeline to apply. - **dynamic_tabarena_validation_protocol** (bool) - Optional - Whether to configure validation splits dynamically. - **text_cache_mode** (TextCacheMode) - Optional - Strategy for text semantic-embedding cache (default: "off"). - **model_constraints** (ModelConstraints|dict) - Optional - Dataset-compatibility constraints. ``` -------------------------------- ### Initialize Experiment Source: https://github.com/autogluon/tabarena/blob/main/_autodocs/api-reference/experiment.md Constructor signature for defining a new experiment runner. ```python def __init__( self, name: str, method_cls: type[AbstractExecModel], method_kwargs: dict, *, experiment_cls: type[ExperimentRunner] = OOFExperimentRunner, experiment_kwargs: dict | None = None, preprocessing_pipeline: str | None = None, dynamic_tabarena_validation_protocol: bool = False, text_cache_mode: TextCacheMode = "off", model_constraints: ModelConstraints | dict | None = None, ) -> None ``` -------------------------------- ### Get Cache Root Definition Source: https://github.com/autogluon/tabarena/blob/main/_autodocs/api-reference/loaders.md Signature for retrieving the current TabArena cache root directory. ```python def get_tabarena_cache_root() -> Path ``` -------------------------------- ### Instantiate MethodMetadata Source: https://github.com/autogluon/tabarena/blob/main/_autodocs/api-reference/models.md Create a metadata object to track benchmark results and cache configurations. ```python from tabarena.models import MethodMetadata metadata = MethodMetadata( suite="tabarena_main", date="2025-06-15", cache_type="results", cache_kwargs={"s3_bucket": "tabarena-results"}, verified=True, ) ``` -------------------------------- ### ExperimentRunner.init_and_run Source: https://github.com/autogluon/tabarena/blob/main/_autodocs/api-reference/experiment-runner.md Executes an experiment and returns a dictionary containing predictions, evaluation metrics, timing, and system resource usage. ```APIDOC ## ExperimentRunner.init_and_run ### Description Initializes and executes an experiment. Returns a result dictionary containing performance metrics and system metadata. ### Parameters - **debug_mode** (bool) - Optional - If True, exceptions are raised directly. If False, exceptions are caught and returned in the result dictionary. ### Result Dictionary Structure - **tid** (int) - Task ID - **dataset** (str) - Task/dataset name - **method** (str) - Method name - **predictions_test** (np.ndarray) - Predictions on test set - **y_test** (np.ndarray) - True test labels - **metric_error** (float) - Evaluated test error - **fit_time** (float) - Model fitting time in seconds - **infer_time** (float) - Inference time in seconds - **memory_peak_mb** (float) - Peak memory usage in MB - **status** (str) - Execution status ("success" or "error") - **error** (str) - Error message if status is "error" ``` -------------------------------- ### ExternalSystemExperiment.__init__ Source: https://github.com/autogluon/tabarena/blob/main/_autodocs/api-reference/experiment.md Initializes a new experiment for external ML systems or methods by wrapping a command-line tool. ```APIDOC ## ExternalSystemExperiment(name: str, command: str, **kwargs) ### Description Wraps an external command-line tool or system for use within TabArena. ### Parameters - **name** (str) - Required - Unique name for the experiment. - **command** (str) - Required - Command-line command or script to invoke the external system. - **kwargs** (dict) - Optional - Additional arguments passed to parent class. ``` -------------------------------- ### Configure SAP-RPT-OSS Benchmark Source: https://github.com/autogluon/tabarena/blob/main/packages/tabflow_slurm/BENCHMARK_LOG.md Sets up a benchmark job for the SAP-RPT-OSS model on the H200 partition with specific memory and time constraints. ```python BenchmarkSetup( benchmark_name="sap_rpt_oss_new_2411", models=[ ("SAP-RPT-OSS", 0), ], num_gpus=1, configs_per_job=1, slurm_gpu_partition="alldlc2_gpu-h200", fake_memory_for_estimates=140, model_agnostic_preprocessing=False, time_limit=5 * 60 * 60, ).setup_jobs() ``` -------------------------------- ### TabArenaContext.__init__ Source: https://github.com/autogluon/tabarena/blob/main/_autodocs/api-reference/contexts.md Initializes the TabArenaContext for the v0.1 benchmark, allowing for the registration of additional methods and filtering of tasks. ```APIDOC ## TabArenaContext.__init__ ### Description Initializes the context for the TabArena v0.1 benchmark. This allows users to define the scope of the benchmark and register custom evaluation methods. ### Parameters - **extra_methods** (list[MethodMetadata] | None) - Optional - Additional methods to register beyond the paper baselines. - **only_valid_tasks** (bool) - Optional - If True, restrict leaderboards to tasks with results. Defaults to False. ``` -------------------------------- ### Configure experiments programmatically Source: https://github.com/autogluon/tabarena/blob/main/_autodocs/configuration.md Create and configure experiments directly in Python using AGModelExperiment, AGModelBagExperiment, and ModelConstraints. ```python from tabarena.benchmark.experiment import AGModelExperiment # Simple LightGBM with defaults exp = AGModelExperiment( name="LightGBM_v1", model_cls="LightGBM", ) # LightGBM with custom hyperparameters exp = AGModelExperiment( name="LightGBM_HPO", model_cls="LightGBM", ag_args_fit={ "num_leaves": 63, "learning_rate": 0.02, "bagging_freq": 5, "bagging_fraction": 0.9, }, preprocessing_pipeline="tabarena_default", ) # With time limit exp = AGModelExperiment( name="LightGBM_600s", model_cls="LightGBM", ag_args_fit={"num_leaves": 31}, time_limit=600, # 10 minutes ) # With bagging from tabarena.benchmark.experiment import AGModelBagExperiment exp = AGModelBagExperiment( name="LightGBM_BAG", model_cls="LightGBM", ag_args_fit={"num_leaves": 31}, ag_args_ensemble={ "num_bag_folds": 5, "num_bag_sets": 10, }, ) # With model constraints from tabarena.benchmark.experiment.model_constraints import ModelConstraints exp = AGModelExperiment( name="LightGBM_constrained", model_cls="LightGBM", ag_args_fit={"num_leaves": 31}, model_constraints=ModelConstraints( max_train_rows=100_000, max_features=500, ), ) ``` -------------------------------- ### Configure TabSwift Benchmark Plan Source: https://github.com/autogluon/tabarena/blob/main/packages/tabflow_slurm/BENCHMARK_LOG.md Defines the benchmark experiment using TabArenaV0pt1ExperimentBundle and GCPSlurmSetup for a single-node GPU run. ```python from tabarena.benchmark.experiment import TabArenaV0pt1ExperimentBundle from tabarena.benchmark.task.metadata import TaskSubset from tabarena.contexts import TabArenaContext from tabflow_slurm import ( GCPSlurmSetup, ModelJob, PathSetup, TabArenaBenchmarkPlan, TabArenaV0pt1ResourcesSetup, ) plan = TabArenaBenchmarkPlan( benchmark_name="tabswift_06072026", model_jobs=[ ModelJob( models=("TabSwift", 0), name="gpu", resources={"num_gpus": 1}, ), ], context=TabArenaContext(), task_subset=TaskSubset(), # full benchmark — every task/split (not just "lite") experiment_bundle=TabArenaV0pt1ExperimentBundle(model_verbosity=2), path_setup=PathSetup( workspace="/home/lennart_priorlabs_ai/workspace/benchmarking/tabarena_workspace", python_path="/home/lennart_priorlabs_ai/.venvs/tabarena_18062026/bin/python", ), resources_setup=TabArenaV0pt1ResourcesSetup(num_cpus=None, memory_limit=None), scheduler_setup=GCPSlurmSetup(gpu_partition="gpurtxpro6000spotinteractive"), ) plan.setup_jobs() ``` -------------------------------- ### Run Experiment via init_and_run Source: https://github.com/autogluon/tabarena/blob/main/_autodocs/api-reference/experiment-runner.md Constructs a runner instance and executes the experiment immediately. ```python @classmethod def init_and_run( cls, method_cls: type[AbstractExecModel], task: TaskWrapper, fold: int, task_name: str, method: str, fit_args: dict | None = None, cleanup: bool = True, cacher: AbstractCacheFunction | None = None, debug_mode: bool = True, **kwargs, ) -> dict ``` -------------------------------- ### Initialize ExternalSystemExperiment Source: https://github.com/autogluon/tabarena/blob/main/_autodocs/api-reference/experiment.md Constructor definition for wrapping external command-line tools. ```python def __init__( self, name: str, command: str, **kwargs, ) -> None ``` -------------------------------- ### Reproduce TabRepo Dataset Subset with Python Source: https://github.com/autogluon/tabarena/blob/main/tabrepo.md Run a small subset of the TabRepo dataset from scratch in a few minutes. Ensure the script is executable. ```python examples/tabrepo/run_quickstart_from_scratch.py ``` -------------------------------- ### Load benchmark results Source: https://github.com/autogluon/tabarena/blob/main/_autodocs/api-reference/loaders.md Demonstrates loading results with and without metadata files. ```python from tabarena.loaders import load_results # Load results with metadata configs, metadata = load_results( path_configs="results/configs.csv", path_metadata="results/metadata.csv", ) print(f"Loaded {len(configs)} configs across {metadata['dataset'].nunique()} datasets") # Load results without metadata configs_only, _ = load_results( path_configs="results/configs.csv", ) ``` -------------------------------- ### Initialize OOFExperimentRunner constructor Source: https://github.com/autogluon/tabarena/blob/main/_autodocs/api-reference/experiment-runner.md Constructor signature for OOFExperimentRunner, including the optional oof_dir parameter for specifying the storage path. ```python def __init__( self, ..., oof_dir: str | Path | None = None, ) -> None ``` -------------------------------- ### Configure and execute TabArena benchmark jobs Source: https://github.com/autogluon/tabarena/blob/main/packages/tabflow_slurm/BENCHMARK_LOG.md Defines custom path and benchmark settings, then initializes and submits jobs to the Slurm cluster. ```python from tabflow_slurm.setup_slurm_base_v2 import BenchmarkSetup2026, PathSetup, SlurmSetup @dataclass class ExtraPathSetup(PathSetup): base_path: str = "/path/to/workspace/" tabarena_repo_name: str = "XXX" venv_name: str = "XXXX" openml_cache_from_base_path: str | Literal["auto"] = "auto" @dataclass class TabArenaV0pt1SingleNodeBenchmarkSetup(BenchmarkSetup2026): shuffle_features: bool = False n_random_configs: int = 200 dynamic_tabarena_validation_protocol: bool = False preprocessing_pipelines: list[str] = field(default_factory=lambda: ["default"]) memory_limit: None = None num_cpus: None = None TabArenaV0pt1SingleNodeBenchmarkSetup( benchmark_name="benchmark_tabpfn_wide_22052026", task_metadata="tabarena-v0.1", num_gpus=1, models=[ ("TabPFN-Wide", 0), ], custom_model_constraints={ "TA-TABPFN-WIDE": { "max_n_samples_train_per_fold": 10_000, "max_n_classes": 10, "regression_support": False, }, }, path_setup=ExtraPathSetup(), slurm_setup=SlurmSetup( gpu_partition="gpua100highmemoryspotmt", cpu_partition="cpuhighmem16mtspot", extra_gres=None, exclusive_node=True, ), ).setup_jobs(array_job_limit=100) ``` -------------------------------- ### Run Warmup Source: https://github.com/autogluon/tabarena/blob/main/_autodocs/api-reference/experiment-runner.md Executes the method's untimed environment warm-up. ```python def run_warmup(self) -> float ``` -------------------------------- ### Evaluate Benchmark Results Source: https://github.com/autogluon/tabarena/blob/main/_autodocs/INDEX.md Configure evaluation methods and generate leaderboards from experiment outputs. ```python from tabarena.evaluation import TabArenaEvalConfig, EvalMethod, run_eval # Configure evaluation config = TabArenaEvalConfig( benchmark_name="my_benchmark", output_dir="/path/to/output", methods=[ EvalMethod(name="LightGBM"), EvalMethod(name="RandomForest"), ], figure_output_dir="/path/to/figures", ) # Generate leaderboards leaderboards = run_eval(config) for subset_name, df in leaderboards.items(): print(f"\n{subset_name}:") print(df[["method", "avg_rank", "win_rate"]].head()) ``` -------------------------------- ### Execute Experiment Source: https://github.com/autogluon/tabarena/blob/main/_autodocs/api-reference/experiment-runner.md Runs the experiment and returns a dictionary containing performance metrics and metadata. ```python def run(self) -> dict ``` -------------------------------- ### Compare methods and generate leaderboards Source: https://github.com/autogluon/tabarena/blob/main/_autodocs/api-reference/contexts.md Generates a leaderboard and comparison plots for a specified subset of tasks. Requires an output directory for saving results. ```python def compare( self, output_dir: str | Path, subset: list[str] | None = None, figure_file_type: str = "pdf", ) -> pd.DataFrame ``` -------------------------------- ### ExperimentRunner.init_and_run Source: https://github.com/autogluon/tabarena/blob/main/_autodocs/api-reference/experiment-runner.md A class method to construct a runner and immediately execute the experiment. ```APIDOC ## Class Method: ExperimentRunner.init_and_run ### Description Constructs a runner with the given configuration and immediately executes the experiment, returning the result dictionary. ### Returns - **dict** - A dictionary containing performance metrics, predictions, and metadata. ``` -------------------------------- ### Reproduce Paper Experiments Source: https://github.com/autogluon/tabarena/blob/main/tabrepo.md Executes a script to reproduce paper experiments, requiring the AutoML2024 branch of TabRepo. This process demands significant disk storage and memory, and may take considerable time. ```bash python scripts/baseline_comparison/evaluate_baselines.py ``` -------------------------------- ### AGExperiment.__init__ Source: https://github.com/autogluon/tabarena/blob/main/_autodocs/api-reference/experiment.md Initializes a new AGExperiment instance to wrap an AutoGluon model with specific fit and ensemble configurations. ```APIDOC ## AGExperiment.__init__ ### Description Initializes a new AGExperiment instance. This constructor handles the setup of AutoGluon-specific serialization, preprocessing, and validation protocols. ### Parameters - **name** (str) - Required - Unique name for the experiment. - **model_cls** (str) - Required - String name of the AutoGluon model (e.g., "LightGBM", "CatBoost"). - **ag_args_fit** (dict | None) - Optional - Hyperparameters passed to the model's fit call. - **ag_args_ensemble** (dict | None) - Optional - Parameters for ensemble operations. - **kwargs** (dict) - Optional - Additional arguments passed to the base Experiment constructor. ``` -------------------------------- ### Benchmark Entry Template Source: https://github.com/autogluon/tabarena/blob/main/packages/tabflow_slurm/BENCHMARK_LOG.md Standard format for documenting new benchmark runs in the log. ```markdown ## YYYY-MM-DD — - **Model(s):** () - **Git SHA:** `` - **Purpose:** - **Notes:** ```python ``` ```