ml-hydra-config

Compose hierarchical Hydra configs with command-line overrides for PyTorch Lightning training runs.

Updated Feb 6, 2026
One-click install
npx skills add https://github.com/nishide-dev/claude-code-ml-research --skill ml-hydra-config
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ml-hydra-config
Source: https://github.com/nishide-dev/claude-code-ml-research/tree/main/skills/ml-hydra-config
Command: npx skills add https://github.com/nishide-dev/claude-code-ml-research --skill ml-hydra-config

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Hydra configuration management solves the problem of scattered, hard-to-maintain ML experiment settings by letting you compose hierarchical configs and override parameters from the command line without editing code.

Core Features & Use Cases

  • Hierarchical config composition: Organize configs into groups (model, data, trainer, callbacks, logger) and compose them at runtime using defaults and overrides.
  • Dynamic instantiation via target: Create models, optimizers, trainers, callbacks, and loggers directly from config definitions using the target field.
  • Experiment reproducibility + scaling: Run single experiments and multiruns for hyperparameter sweeps while keeping per-run directories and config snapshots.
  • Optuna hyperparameter optimization: Use Hydra’s Optuna sweeper integration to define search spaces and run HPO without rewriting training logic.
  • Lightning integration patterns: Fit cleanly into a PyTorch Lightning training script pattern (instantiate datamodule/model/callbacks/logger/trainer from configs).

Use case example: You can reproduce and sweep a Lightning training setup by composing a base config with experiment-specific groups and then sweeping learning rates and batch sizes using multirun or Optuna.

Quick Start

Run the Hydra-based training entrypoint with a specific model and data override (for example: change the model to vit and the dataset to imagenet) to verify your composed configuration instantiates correctly.

Frequently Asked Questions about ml-hydra-config

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I manage ML experiment configurations with Hydra and PyTorch Lightning?

Hydra manages ML experiment configurations by composing hierarchical config groups for models, data, and trainers, then applying command-line overrides to dynamically instantiate PyTorch Lightning training components without editing code.

How does Hydra dynamic instantiation work for PyTorch Lightning training components?

Hydra dynamic instantiation uses the _target_ field in configuration files to automatically create models, optimizers, trainers, callbacks, and loggers directly from config definitions at runtime, streamlining the PyTorch Lightning training setup.

Can I run hyperparameter sweeps with Optuna using Hydra configuration management?

Yes, Hydra configuration management supports hyperparameter sweeps through its Optuna sweeper integration, allowing you to define search spaces and run hyperparameter optimization without rewriting your training logic.

What is the best way to organize PyTorch Lightning configs for reproducible ML experiments?

The best way to organize configs for reproducible ML experiments is grouping them into model, data, trainer, callbacks, and logger directories, then composing them at runtime using Hydra defaults while keeping per-run directories and config snapshots.

Do I need specific Hydra config files to use hierarchical composition for ML experimentation?

Yes, you need Hydra config files that utilize defaults composition and _target_ fields to correctly instantiate training components and execute ML experimentation runs with PyTorch Lightning and Optuna sweeps.