MCPcopy Index your code
hub / github.com/CandleLabAI/PCBSegClassNet / parse

Function parse

src/utils/options.py:33–44  ·  view source on GitHub ↗

Parse option file. Args: opt_path (str): Option file path. is_train (str): Indicate whether in training or not. Default: True. Returns: (dict): Options.

(opt_path)

Source from the content-addressed store, hash-verified

31
32
33def parse(opt_path):
34 """Parse option file.
35 Args:
36 opt_path (str): Option file path.
37 is_train (str): Indicate whether in training or not. Default: True.
38 Returns:
39 (dict): Options.
40 """
41 with open(opt_path, mode="r") as f:
42 Loader, _ = ordered_yaml()
43 opt = yaml.load(f, Loader=Loader)
44 return opt
45
46
47def dict2str(opt, indent_level=1):

Callers 2

parse_configFunction · 0.90
parse_configFunction · 0.90

Calls 1

ordered_yamlFunction · 0.85

Tested by

no test coverage detected