summaryrefslogtreecommitdiff
path: root/training/main.py
blob: 6e54a23eb4a9a73ba8c91a5689d7481596aeee66 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
"""Loads config with hydra and runs experiment."""
import hydra
from omegaconf import DictConfig
from training.metadata import TRAINING_DIR


@hydra.main(version_base="1.2", config_path=TRAINING_DIR / "conf", config_name="config")
def main(config: DictConfig) -> None:
    """Loads config with hydra and runs the experiment."""
    import utils
    from run import run

    utils.extras(config)

    if config.get("print_config"):
        utils.print_config(config)

    return run(config)


if __name__ == "__main__":
    main()