A Typer CLI application for tuning Lightning modules with Optuna.
Project description
optuna-lightning-cli
A small Typer CLI for tuning lightning.pytorch modules with Optuna.
Install the MNIST example extra and run the sample HPO flow:
pip install -e ".[examples]"
optuna-lightning tune \
--training-config examples/mnist-training.yaml \
--optuna-config examples/mnist-optuna.yaml
MnistClassifier owns the training loop (training_step,
validation_step, and configure_optimizers). MnistDataModule owns the
MNIST download and data loaders. The CLI validates the config pair, patches
Optuna samples into the flat training config, and hands everything to
Trainer.fit().
print-config renders the normalized Lightning config under a Lightning Base Config header and the Optuna config under an Optuna Config header.
The CLI also includes config printing, validation, and persisted study inspection:
optuna-lightning print-config \
--training-config examples/mnist-training.yaml \
--optuna-config examples/mnist-optuna.yaml
optuna-lightning validate \
--training-config examples/mnist-training.yaml \
--optuna-config examples/mnist-optuna.yaml
optuna-lightning studies list --storage sqlite:///optuna.db
optuna-lightning studies show \
--storage sqlite:///optuna.db \
--study-name mnist
optuna-lightning studies trials \
--optuna-config examples/mnist-optuna.yaml
The example Optuna config stores studies in ./optuna.db relative to the
directory where the command is run, so studies trials --optuna-config examples/mnist-optuna.yaml can inspect persisted trials later. The trials
table labels the value column as Objective [val_acc, maximize] for the MNIST
example, and storage-only inspection still shows the study direction in the
column header.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file optuna_lightning_cli-0.1.0.tar.gz.
File metadata
- Download URL: optuna_lightning_cli-0.1.0.tar.gz
- Upload date:
- Size: 172.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
49eafbae93cacbd89b93b533d93e549e1cf3214bf2f8432b6f50082c05979151
|
|
| MD5 |
bbb5abdce576c9a44066566c2bf7866f
|
|
| BLAKE2b-256 |
5c770765210ad68004485a83c40bda5984c4b8c1214863cb78badfdd39290a76
|
Provenance
The following attestation bundles were made for optuna_lightning_cli-0.1.0.tar.gz:
Publisher:
publish.yml on LukeCPadmore/optuna-lightning-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
optuna_lightning_cli-0.1.0.tar.gz -
Subject digest:
49eafbae93cacbd89b93b533d93e549e1cf3214bf2f8432b6f50082c05979151 - Sigstore transparency entry: 1772990639
- Sigstore integration time:
-
Permalink:
LukeCPadmore/optuna-lightning-cli@a57cc3bacbade7fe07622f846140076124ccf7be -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/LukeCPadmore
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a57cc3bacbade7fe07622f846140076124ccf7be -
Trigger Event:
release
-
Statement type:
File details
Details for the file optuna_lightning_cli-0.1.0-py3-none-any.whl.
File metadata
- Download URL: optuna_lightning_cli-0.1.0-py3-none-any.whl
- Upload date:
- Size: 17.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5022292eb9bd6f9920055481b17a68c227c0465401c077e753c4d469e3581e0a
|
|
| MD5 |
57fd0df41b859cdb746e0670d8a0c1e0
|
|
| BLAKE2b-256 |
47876348bf4c018608417e395c70ea2a85f8df1d86be8191725b3cdd8ee1188f
|
Provenance
The following attestation bundles were made for optuna_lightning_cli-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on LukeCPadmore/optuna-lightning-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
optuna_lightning_cli-0.1.0-py3-none-any.whl -
Subject digest:
5022292eb9bd6f9920055481b17a68c227c0465401c077e753c4d469e3581e0a - Sigstore transparency entry: 1772990798
- Sigstore integration time:
-
Permalink:
LukeCPadmore/optuna-lightning-cli@a57cc3bacbade7fe07622f846140076124ccf7be -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/LukeCPadmore
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a57cc3bacbade7fe07622f846140076124ccf7be -
Trigger Event:
release
-
Statement type: