"tests/python/common/test_readout.py" did not exist on "c3516f1a8e68504d4dd0bec32887f8af079965d7"
Commit 554b6992 authored by Anastasia Tkach's avatar Anastasia Tkach Committed by Facebook GitHub Bot
Browse files

Moving add_cfg_nodes helper from config.py to runner.py

Summary:
Pull Request resolved: https://github.com/facebookresearch/d2go/pull/460

Moving add_cfg_nodes helper from config.py to runner.py

Reviewed By: wat3rBro

Differential Revision: D42209435

fbshipit-source-id: 6eac4987c57df148307911e4fe87d99d8590d4ac
parent 0e0a67f4
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
# forward the namespace to avoid `d2go.config.config` # forward the namespace to avoid `d2go.config.config`
from .config import ( from .config import (
add_cfg_nodes,
auto_scale_world_size, auto_scale_world_size,
CfgNode, CfgNode,
CONFIG_CUSTOM_PARSE_REGISTRY, CONFIG_CUSTOM_PARSE_REGISTRY,
...@@ -20,7 +19,6 @@ __all__ = [ ...@@ -20,7 +19,6 @@ __all__ = [
"CONFIG_CUSTOM_PARSE_REGISTRY", "CONFIG_CUSTOM_PARSE_REGISTRY",
"CONFIG_SCALING_METHOD_REGISTRY", "CONFIG_SCALING_METHOD_REGISTRY",
"CfgNode", "CfgNode",
"add_cfg_nodes",
"auto_scale_world_size", "auto_scale_world_size",
"load_full_config_from_file", "load_full_config_from_file",
"reroute_config_path", "reroute_config_path",
......
...@@ -191,13 +191,3 @@ def load_full_config_from_file(filename: str) -> CfgNode: ...@@ -191,13 +191,3 @@ def load_full_config_from_file(filename: str) -> CfgNode:
cfg = loaded_cfg.get_default_cfg() cfg = loaded_cfg.get_default_cfg()
cfg.merge_from_other_cfg(loaded_cfg) cfg.merge_from_other_cfg(loaded_cfg)
return cfg return cfg
def add_cfg_nodes(cfg, key: str, cfg_dict: Dict):
node = CfgNode()
setattr(cfg, key, node)
for k, v in cfg_dict.items():
if isinstance(v, dict):
add_cfg_nodes(node, k, v)
else:
setattr(node, k, v)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment