From 833db23d596d7a2ee22b31f9b6b708103d67a69c Mon Sep 17 00:00:00 2001 From: Fabrice Normandin Date: Thu, 5 Dec 2024 15:31:03 -0500 Subject: [PATCH] Minor fix for doc / readability of main.py Signed-off-by: Fabrice Normandin --- project/configs/config.py | 2 +- project/main.py | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/project/configs/config.py b/project/configs/config.py index 277b0f6f..2b4482e4 100644 --- a/project/configs/config.py +++ b/project/configs/config.py @@ -27,7 +27,7 @@ class Config: It is suggested for this class to accept a `datamodule` and `network` as arguments. The instantiated datamodule and network will be passed to the algorithm's constructor. - For more info, see the [instantiate_algorithm][project.experiment.instantiate_algorithm] function. + For more info, see the [instantiate_algorithm][project.main.instantiate_algorithm] function. """ datamodule: Any | None = None diff --git a/project/main.py b/project/main.py index 5d72a8a5..5ed42379 100644 --- a/project/main.py +++ b/project/main.py @@ -48,7 +48,6 @@ add_headers=False, # don't fallback to adding headers if we can't use vscode settings file. ) -# setup_logging(log_level="INFO", global_log_level="ERROR") add_configs_to_hydra_store() @@ -73,12 +72,10 @@ def main(dict_config: DictConfig) -> dict: """ print_config(dict_config, resolve=False) - if dict_config["algorithm"] is None: - raise ValueError("The 'algorithm' config group is required for the experiment to run.") + assert dict_config["algorithm"] is not None # Resolve all the interpolations in the configs. config: Config = resolve_dictconfig(dict_config) - setup_logging( log_level=config.log_level, global_log_level="DEBUG" if config.debug else "INFO" if config.verbose else "WARNING",