Skip to content

Commit

Permalink
Minor fix for doc / readability of main.py
Browse files Browse the repository at this point in the history
Signed-off-by: Fabrice Normandin <[email protected]>
  • Loading branch information
lebrice committed Dec 6, 2024
1 parent 23156e1 commit 833db23
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion project/configs/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 1 addition & 4 deletions project/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()


Expand All @@ -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",
Expand Down

0 comments on commit 833db23

Please sign in to comment.