2021-02-21 12:51:07 +00:00
|
|
|
# ClearML - Hydra Example
|
|
|
|
#
|
|
|
|
import hydra
|
|
|
|
|
|
|
|
from omegaconf import OmegaConf
|
|
|
|
|
|
|
|
from clearml import Task
|
|
|
|
|
|
|
|
|
2022-06-28 18:16:12 +00:00
|
|
|
@hydra.main(config_path="config_files", config_name="config", version_base=None)
|
2021-02-21 12:51:07 +00:00
|
|
|
def my_app(cfg):
|
|
|
|
# type (DictConfig) -> None
|
2022-02-14 08:18:41 +00:00
|
|
|
task = Task.init(project_name="examples", task_name="Hydra configuration")
|
2021-02-21 12:51:07 +00:00
|
|
|
logger = task.get_logger()
|
|
|
|
logger.report_text("You can view your full hydra configuration under Configuration tab in the UI")
|
|
|
|
print(OmegaConf.to_yaml(cfg))
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
my_app()
|