Abstract
YAMLE (Yet Another Machine Learning Environment) is a modular, open-source framework built on PyTorch Lightning designed to eliminate the "boilerplate monster" in machine learning research. By standardizing the interfaces between data, models, and training methods, it allows researchers to focus on core innovation rather than re-implementing logging, data loading, and hyperparameter optimization for every new project. This paper introduces the architecture and design philosophy behind YAMLE, highlighting its potential to improve reproducibility and streamline experimental workflows.
Introduction
The "re-implementation tax" is a significant burden in machine learning (ML) research. When testing a new idea, researchers often write hundreds of lines of boilerplate code for data preprocessing, training loops, evaluation metrics, and logging. Furthermore, because every researcher builds their own custom pipeline, comparing two different models "apples-to-apples" becomes nearly impossible. Disparate implementations lead to a lack of standardization, which directly hinders reproducibility—the cornerstone of scientific progress.
YAMLE addresses this by providing a generalist, customizable environment where the underlying infrastructure is already connected, allowing users to swap components in and out seamlessly.
System Architecture
YAMLE’s architecture is built on three main pillars, all orchestrated by a central "Trainer/Tester" logic. This modular design ensures that components can be developed and tested in isolation before being integrated into a larger pipeline.
- BaseDataModule: Handles the "where" and "what" of the data. It manages downloading, loading, and preprocessing, while defining the specific task (e.g., classification vs. regression).
- BaseModel: Defines the architecture's forward pass and layers. It remains configurable to adapt to different input/output dimensions provided by the data module.
- BaseMethod: This is the framework's most novel aspect. It defines the training logic itself. By overloading standard steps (training, validation, testing), researchers can implement entirely new training algorithms—such as specialized regularization or optimization techniques—and apply them to any model within the ecosystem.
The framework leverages industry-standard tools, including PyTorch Lightning for orchestration, syne-tune for hyperparameter optimization (HPO), torchmetrics for evaluation, and TensorBoard for logging.
Design Philosophy
Separation of Concerns
The most powerful idea in YAMLE is the decoupling of the Method from the Model. In many frameworks, training logic is baked into the model class. In YAMLE, a "Method" for a specific type of regularization can be applied to a CNN, a Transformer, or an MLP without changing a single line of the model's code.
Template-First Design
Unlike a library that is simply imported, YAMLE is designed to be the "skeleton" of a research project. Researchers clone the repository and build inside it, ensuring that their work is automatically compatible with the rest of the ecosystem.
CLI-Driven Experimentation
The framework emphasizes a robust Command-Line Interface (CLI). This allows researchers to trigger complex experiments—including HPO and multi-epoch training—using simple, reproducible shell commands rather than custom scripts.
Evaluation and Results
As a framework-focused project, YAMLE is presented as a functional system rather than a benchmark-breaking algorithm. Its effectiveness is demonstrated through its ability to:
- Streamline Workflow: Users can initiate training, testing, and HPO with standardized commands (e.g.,
python yamle/cli/train.py ...). - Ensure Reproducibility: By recording all settings and using standardized components, YAMLE makes it significantly easier for researchers to replicate results exactly.
- Facilitate Comparison: Because the infrastructure is shared, comparing a new "Method" against a baseline on the same "Model" and "DataModule" provides a true head-to-head comparison.
While the framework is demonstrated using the MNIST dataset, it is designed to wrap any existing dataset across domains like image, text, and time-series data.
Limitations and Future Work
YAMLE is currently in its early stages. Its primary focus is supervised regression and classification, with support for unsupervised, self-supervised, and reinforcement learning on the roadmap. Future priorities include expanding the "Model Zoo" with more pre-implemented components, improving documentation, and adding multi-device/multi-node training support.
Summary updated