Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/suneeta-mall/hydra_pydantic_config_management
https://github.com/suneeta-mall/hydra_pydantic_config_management
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/suneeta-mall/hydra_pydantic_config_management
- Owner: suneeta-mall
- Created: 2022-03-15T10:28:47.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-03-17T00:57:39.000Z (over 2 years ago)
- Last Synced: 2024-07-03T23:45:05.976Z (4 months ago)
- Language: Python
- Size: 2.19 MB
- Stars: 16
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
#
## Hydra
### Unstructured config
```bash
cd intro
python my_app_non_structured.py
python my_app_non_structured.py db.user=suneeta
python my_app_non_structured.py db.user=suneeta --config-dir conf_custom_hydra
python my_app_non_structured.py db.user=suneeta --config-name config_hydra
# Multi-run
python my_app_non_structured.py db.user=suneeta schema=school,support,warehouse --config-dir conf_custom_hydra --multirun
# Distributed environment
```### Structured config
```bash
cd intro
python my_app.py
python my_app.py db.user=suneeta
python my_app.py db.user=suneeta --config-dir conf_custom_hydra
# python my_app.py db.user=suneeta --config-name config_hydra
# Multi-run
python my_app.py db.user=suneeta schema=school,support,warehouse --config-dir conf_custom_hydra --multirun
# Distributed environment like RANK
```## Pydantic
Data class structured config example is shown [here](pydantic/model_dc.py), BaseMode structured config is [here](pydantic/model.py) and dynamic config example is [here](pydantic/dynamic.py)
## Pydantic and Hydra
```bash
cd pydra
python example.py model=resnet_v3
python example.py model=resnet_v3 +model.zoom=25
python example.py model=resnet_v2_interpolate
python example.py
python example.py model.context=512 dataset.name=IMAGENET +model.zoom=21
python example.py --config-path outputs/example/2022-03-10_12-51-45/.hydra/ --config-name config
```