Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[test] Test for config, network and loss builder #15

Merged
merged 6 commits into from
Feb 2, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[feat] Add 'allow_unsafe' in yaml parsing
  • Loading branch information
mousyball committed Feb 2, 2021
commit f040be2730b0b08d8e8a1fc91a38c0cc972fbd56
4 changes: 2 additions & 2 deletions pytorch_trainer/utils/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ def get_cfg_defaults():
return _C.clone()


def parse_yaml_config(config_path):
def parse_yaml_config(config_path, allow_unsafe=False):
cfg = get_cfg_defaults()
cfg.merge_from_file(config_path)
cfg.merge_from_file(config_path, allow_unsafe)
cfg.freeze()
return cfg