Skip to content

Conversation

@ibro45
Copy link

@ibro45 ibro45 commented Dec 9, 2025

Hey guys, I've just played around with this now that Lighter's been redesigned to be simpler and more Pytorch-Lightning-native. Actually, the redesign was partially prompted by this repo. Not expecting this to be merged, just for your interest.

Summary

  • Replace MONAI's ConfigParser with Lighter framework for configuration management
  • Add __lighter__.py marker file enabling project.* imports automatically
  • Update all YAML configs to Lighter syntax (%vars::, $@ expressions)
  • Rename config sections: lightning_modulemodel, data_moduledata
  • Update Python imports to use project.* prefix throughout codebase
  • Simplify dependencies in pyproject.toml
  • Remove scripts/run.py (replaced by lighter CLI)

New Usage

# Training
lighter fit configs/train.yaml configs/models/primus.yaml configs/datasets/amos.yaml

# With CLI overrides
lighter fit configs/train.yaml trainer::max_epochs=50 model::base_lr=0.0005

# Prediction
lighter predict configs/predict.yaml

Benefits

  • Cleaner CLI: lighter fit config.yaml instead of custom fire scripts
  • Better override syntax: model::learning_rate=0.01
  • Automatic timestamped experiment outputs
  • Built-in config saving for reproducibility

Test plan

  • Verify lighter CLI is available after install
  • Test config parsing with trainer::fast_dev_run=true
  • Full training run with actual dataset

ibro45 and others added 7 commits December 8, 2025 23:43
Replace MONAI's ConfigParser with Lighter framework for configuration management.

Key changes:
- Add __lighter__.py marker file for project.* imports
- Update all YAML configs to Lighter syntax:
  - %var -> %vars::var (raw references)
  - @section#key -> %section::key or $@section::key (expressions)
  - lightning_module -> model
  - data_module -> data
- Update Python imports to use project.* prefix
- Add training/__init__.py for module exports
- Remove scripts/run.py (replaced by lighter CLI)
- Remove utils/imports.py (replaced by __lighter__.py)
- Simplify pyproject.toml dependencies

Usage:
  lighter fit configs/train.yaml configs/models/primus.yaml configs/datasets/amos.yaml

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant