making progress with hydra

This commit is contained in:
hobogalaxy committed 2021-01-07 22:40:21 +01:00
1 parent 610117f161
commit d24568e686
21 files changed
+142 -104

No files matched your search

+21 -2
View File
@@ -1,14 +1,33 @@
import torch
import yaml
from omegaconf import DictConfig, OmegaConf
import hydra.conf.hydra.output
from hydra.experimental import initialize, compose
import comet_ml
from pytorch_lightning.loggers import CSVLogger, WandbLogger, CometLogger, TestTubeLogger, TensorBoardLogger
import logging
@hydra.main(config_path="configs/", config_name="project_config.yaml")
log = logging.getLogger(__name__)
@hydra.main(config_path="configs/", config_name="config.yaml")
def my_app(cfg: DictConfig) -> None:
# pass
# print(cfg)
print(OmegaConf.to_yaml(cfg))
log.info(OmegaConf.to_yaml(cfg, resolve=True))
def test_logger():
logger = WandbLogger()
print(logger)
if __name__ == "__main__":
my_app()
# with open("epoch=0.ckpt", "rb") as file:
# data = torch.load(file)
# print(data)
# test_logger()