NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

MLXP: A framework for conducting replicable experiments in Python

Michael Arbel, Alexandre Zouaoui

TL;DR

MLXP is a new, open-source Python framework designed to make machine learning experiments more reproducible and replicable with minimal overhead for researchers. It builds on Hydra for configuration and adds essential features like automated logging, job versioning, and an intuitive results reader to streamline the entire experimental workflow.

What Problem Does This Paper Address?

The paper tackles a growing concern in machine learning (ML) research: the difficulty of replicating experiments. This is due to complex, non-deterministic algorithms, a vast number of hyperparameters, and dependencies on specific software and hardware. While existing tools exist, they often introduce significant complexity, hindering their adoption by the research community. Researchers need a tool that simplifies experiment management, ensures reproducibility, and integrates seamlessly into their existing Python workflows without a steep learning curve.

Methods

MLXP is a Python framework that leverages the configuration capabilities of Hydra. Its core contributions lie in providing a lightweight, yet comprehensive, solution for experiment management. Key features include:

  • Automated Job Launching: Integrates with job schedulers (like SLURM) via the mlxpsub command, allowing for easy submission of multiple experiments.
  • Hierarchical Configuration: Builds upon Hydra's ability to manage complex configurations through YAML files and command-line overrides.
  • Automated Logging: Captures experiment metadata (configurations, environment details, run status) and allows users to log custom metrics and artifacts.
  • Code and Job Versioning: Automatically tracks Git commits associated with experiments, ensuring that jobs are executed with the correct code version, even if the codebase changes during execution.
  • Intuitive Results Reader: Provides a "lazy evaluation" mechanism to efficiently query, filter, group, and aggregate experiment results, returning them in a Pandas-like dataframe structure.

Datasets

Not discussed in the paper.

Key Insights and Ideas

  • Simplicity is Key for Adoption: The paper strongly emphasizes that complex tools, even if powerful, will not be adopted by researchers if they require significant effort to learn and integrate. MLXP's design prioritizes a low entry barrier.
  • Hydra as a Foundation: Recognizing Hydra's strengths in configuration, MLXP extends it rather than reinventing the wheel, focusing on the missing pieces for experiment management.
  • The Importance of Versioning: The paper highlights how delayed job execution on HPC clusters can lead to experiments running with unintended code versions, undermining reproducibility. MLXP's version manager directly addresses this.
  • Lazy Evaluation for Efficiency: For large-scale experiments, loading all results into memory can be prohibitive. MLXP's lazy evaluation of results significantly improves efficiency and scalability.
  • Bridging the Gap: MLXP aims to bridge the gap between the highly organized, often complex, tools used in industrial ML settings and the more agile, flexible needs of academic research.

Key Results

The paper doesn't present quantitative results from a benchmark experiment comparing MLXP to other tools. Instead, it focuses on demonstrating the functionality and ease of use of MLXP through code examples and descriptions of its components. The key "result" is the framework itself, designed to enable researchers to conduct replicable experiments with minimal friction. Examples are provided showing how MLXP can be used in projects like HySUPP and for benchmarking optimization algorithms, illustrating its practical application.

Limitations and Future Work

The authors acknowledge several limitations and propose future directions:

  • Advanced Analysis Tools: MLXP currently has basic diff functionality for comparing configurations. Future work could involve developing more sophisticated automated analysis tools and reports.
  • Logging Hardware/Software Versions: While Python dependencies are logged, logging hardware and external software versions (like CUDA drivers) is a potential enhancement.
  • Versioning Models and Data: The current system versions code and logs artifacts. Dedicated methods for versioning ML models and datasets are suggested.
  • Interactive Visualization and Collaboration: MLXP currently lacks built-in features for interactive visualization and collaborative work.
  • Reduced Logging Intrusiveness: While MLXP is designed to be lightweight, further reducing the intrusiveness of logging calls is a potential area for improvement.

Summary updated

BibTeX
@inproceedings{arbel2024mlxp,
  author = {Michael Arbel and Alexandre Zouaoui},
  title = {{MLXP: A framework for conducting replicable experiments in Python}},
  booktitle = {ACM-REP},
  year = {2024},
  url = {https://openreview.net/forum?id=1lGvjf3uU5},
}
Figure