Skip to content

Latest commit

 

History

History
54 lines (40 loc) · 1.48 KB

README.md

File metadata and controls

54 lines (40 loc) · 1.48 KB

Introduction

Machine learning researchers frequently need to experiment with different parameter configurations to fine-tune their models. Managing these configurations efficiently poses a significant challenge. To address this, we developed Ym2, a configuration management framework inspired by torchtune

Ym2 provides:

  • Declaration of custom Python classes and parameters through yaml configuration files
  • Simple configuration overrides via command-line arguments
  • Support for multiple experimental runs with different configurations
  • Comprehensive experiment logging and management

Installation

We use Ym2 daily and continually improve and add more features

# Install the latest version
pip install ym2

# Change to sample directory
cd sample/

# Run hello world example
ym2 configs/config.yaml

# Override parameter `name`
ym2 configs/config.yaml name=X

# Execute sequentially with `name=X` and `name=Y`
ym2 configs/config.yaml name=X,Y

# Adding new parameters `x` and `y`
ym2 configs/config.yaml x=1 y=2
from ym2 import instantiate
hello_world: DictConfig = ...

# Create a new class instance from a configuration
obj = instantiate(hello_world)

# Adding additional parameters
obj = instantiate(hello_world, x=1, y=2)

Example config

# file: config.yaml
_cls_: recipes.hello.Hello # indicate the class name
name: Vitalik Buterin # first argument of class Hello

Feedback

Create a new pull request