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

Can i load yaml file directly ? #25

Open
shaofengzeng opened this issue May 22, 2019 · 1 comment
Open

Can i load yaml file directly ? #25

shaofengzeng opened this issue May 22, 2019 · 1 comment

Comments

@shaofengzeng
Copy link

I want load yaml file directly, code like
cfg = load_cfg('***.yaml')
but i got an error, i.e. no corresponding CfgNode exist.

@smartinellimarco
Copy link

Two years later but might be useful for someone else:

# Create conf   
_C = CN()
# Allow creating new keys recursively.
_C.set_new_allowed(True)
_C.merge_from_file(filename)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants