• Haroun Habeeb's avatar
    temp_new_allowed · 7bed2910
    Haroun Habeeb authored
    Summary:
    Pull Request resolved: https://github.com/facebookresearch/d2go/pull/438
    
    Adding new fields to a config is only allowed if `new_allowed=True`. yacs `CfgNode` provides a `set_new_allowed(value: bool)` function.
    
    We create a context manager like `temp_defrost` but for new_allowed to use it. We also implement unit test for the same
    
    Reviewed By: yanglinfang, newstzpz, wat3rBro
    
    Differential Revision: D41748992
    
    fbshipit-source-id: 71d048511476001ca96e6b36dde4d177b11268d7
    7bed2910
test_config.py 10.7 KB