MCPcopy
hub / github.com/PaddlePaddle/PaddleOCR / load_config

Function load_config

tools/program.py:75–85  ·  view source on GitHub ↗

Load config from yml/yaml file. Args: file_path (str): Path of the config file to be loaded. Returns: global config

(file_path)

Source from the content-addressed store, hash-verified

73
74
75def load_config(file_path):
76 """
77 Load config from yml/yaml file.
78 Args:
79 file_path (str): Path of the config file to be loaded.
80 Returns: global config
81 """
82 _, ext = os.path.splitext(file_path)
83 assert ext in [".yml", ".yaml"], "only support yaml files for now"
84 config = yaml.load(open(file_path, "rb"), Loader=yaml.SafeLoader)
85 return config
86
87
88def merge_config(config, opts):

Callers 4

preprocessFunction · 0.90
mainFunction · 0.90
mainFunction · 0.90
preprocessFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…