summaryrefslogtreecommitdiff
path: root/training/main.py
blob: 73adda07043c5bb0ccb1cdb76d2fbbd27ab4c2cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
"""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=str(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()