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

Function parse_config

src/train_segmentation.py:22–41  ·  view source on GitHub ↗

Helper function to parse config

()

Source from the content-addressed store, hash-verified

20from data import get_data
21
22def parse_config():
23 """
24 Helper function to parse config
25 """
26 parser = argparse.ArgumentParser()
27 parser.add_argument(
28 "-opt",
29 type=str,
30 required=True,
31 help="Path to option YAML file."
32 )
33 parser.add_argument("-epoch",
34 type=int,
35 default=1,
36 help="number of epochs.")
37 args = parser.parse_args()
38
39 opt = parse(args.opt)
40 opt["train"]["total_epochs"] = args.epoch
41 return opt
42
43def init_log(opt):
44 """

Callers 1

mainFunction · 0.70

Calls 1

parseFunction · 0.90

Tested by

no test coverage detected