summaryrefslogtreecommitdiff
path: root/training/run.py
diff options
context:
space:
mode:
Diffstat (limited to 'training/run.py')
-rw-r--r--training/run.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/training/run.py b/training/run.py
index f745d61..d88a8f6 100644
--- a/training/run.py
+++ b/training/run.py
@@ -2,7 +2,7 @@
from typing import List, Optional, Type
import hydra
-from loguru import logger as log
+import loguru.logger as log
from omegaconf import DictConfig
from pytorch_lightning import (
Callback,
@@ -33,11 +33,11 @@ def run(config: DictConfig) -> Optional[float]:
log.info(f"Instantiating model <{config.model._target_}>")
model: LightningModule = hydra.utils.instantiate(
- config.model,
+ **config.model,
network=network,
- criterion=config.criterion,
- optimizer=config.optimizer,
- lr_scheduler=config.lr_scheduler,
+ criterion_config=config.criterion,
+ optimizer_config=config.optimizer,
+ lr_scheduler_config=config.lr_scheduler,
_recursive_=False,
)