Spaces:
Paused
Paused
Create utils/Config.py
Browse files- utils/Config.py +24 -0
utils/Config.py
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from fvcore.common.config import CfgNode as _CfgNode
|
2 |
+
|
3 |
+
class CfgNode(_CfgNode):
|
4 |
+
"""
|
5 |
+
The same as `fvcore.common.config.CfgNode`, but different in:
|
6 |
+
1. Use unsafe yaml loading by default.
|
7 |
+
Note that this may lead to arbitrary code execution: you must not
|
8 |
+
load a config file from untrusted sources before manually inspecting
|
9 |
+
the content of the file.
|
10 |
+
2. Support config versioning.
|
11 |
+
When attempting to merge an old config, it will convert the old config automatically.
|
12 |
+
.. automethod:: clone
|
13 |
+
.. automethod:: freeze
|
14 |
+
.. automethod:: defrost
|
15 |
+
.. automethod:: is_frozen
|
16 |
+
.. automethod:: load_yaml_with_base
|
17 |
+
.. automethod:: merge_from_list
|
18 |
+
.. automethod:: merge_from_other_cfg
|
19 |
+
"""
|
20 |
+
|
21 |
+
def merge_from_dict(self, dict):
|
22 |
+
pass
|
23 |
+
|
24 |
+
node = CfgNode()
|