Created
February 13, 2023 10:02
-
-
Save gorodnitskiy/2da91fc3be41cf5bd4ca344e81ede1af to your computer and use it in GitHub Desktop.
hydra-configs-how-to-run-deep-learning-pipeline-with-hydra-2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from hydra import compose, initialize_config_dir | |
from omegaconf import OmegaConf | |
from src.train import train | |
def main() -> None: | |
with initialize_config_dir(version_base="1.3", config_dir="."): | |
cfg = compose( | |
config_name="train.yaml", return_hydra_config=True, overrides=[] | |
) | |
print(OmegaConf.to_yaml(cfg)) | |
train(cfg) | |
if __name__ == "__main__": | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment