question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hydra/OmegaConf configuration structure

See original GitHub issue

🚀 Feature Request

Hydra provides interesting features to create hierarchical configuration by composition and override it through config files and the command line. I think that this ability will be useful for catalyst pipelines with configuration file. Now one configuration file contains all pipeline settings inside, but if we split it to for example model_params/data_params/runner_params/and so on then we will be able to get configuration structure distributed in sence. This will allow us to quickly run experiments with different combinations of settings and also change settings in the command line

Example pipeline:

pipeline/
    conf/
        config.yaml
        model/
            resnet.yaml
            mobilenet.yaml
            efficientnet.yaml
        data/
            imagenet.yaml
            coco.yaml
        runner/
            runner1.yaml
            runner2.yaml
    src/
        callbacks.py
        model.py
        ...

Run example: catalyst-dl run config=conf/config.yaml model=resnet data=imagenet runner=runner1

Possible solution

  1. Create class HConfigExperiment class
  2. Change catalyst-dl run script

Motivation

Combining configuration parts for different experiments. Change settings in command line.

Proposal

Alternatives

Additional context

I’ve already written simple MNIST classification pipeline with hydra configuration structure. But I can run it only with python train.py command.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
otherman16commented, Aug 13, 2020

@Scitator Ok. Moving to slack now.

1reaction
otherman16commented, Aug 12, 2020

@Scitator They are almost the same but with Hydra/OmegaConf you can also:

  1. Change specific settings in command line. Example: catalyst-dl run config=conf/config.yaml model=resnet data=imagenet runner=runner1 model.resnet=50/101/...
  2. Command line Tab Completion
  3. Select default configuration
  4. As say @omry Structured Configs + Object Instantiating
  5. Multi-run different configurations with one command
  6. And other features (I don’t know hydra well enough).

One more advantage of using Hydra/OmegaConf is that Hydra can say ‘Catalyst uses us’ and Catalyst can also say ‘We use Hydra’. So the community will grow. And we will be happier =)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Introduction to Structured Configs - Hydra
Structured Configs use Python dataclasses to describe your configuration structure and types. They enable: Runtime type checking as you compose or mutate ...
Read more >
Structured config — OmegaConf 2.1.3.dev0 documentation
Structured configs are used to create OmegaConf configuration object with ... Two types of structures classes that are supported: dataclasses and attr ...
Read more >
Pydra - Pydantic and Hydra for configuration management of ...
All in all, powered by OmegaConf this is a great tool for config management. A simple non-structured config example. Let's look at a...
Read more >
Complete tutorial on how to use Hydra in Machine Learning ...
omegaconf is installed by default with hydra . It is only used to provide ... The directory structure of the config folder would...
Read more >
What are Hydra advantages vs using a regular configuration file
For example, consider the following .yaml configuration file: ... The fact that Hydra uses OmegaConf as a backend comes with several ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found