MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / read_config

Function read_config

modelzoo/benchmark/cpu/log_process.py:17–34  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15
16
17def read_config():
18 bs_dic = {}
19 cur_path = os.path.dirname(os.path.realpath(__file__))
20 config_path = os.path.join(cur_path, "config.yaml")
21 models=[]
22 with open(config_path, 'r', encoding='utf-8') as f:
23 config = yaml.safe_load(f.read())
24 models = config["test_model"]
25 stock_tf = config["stocktf"]
26 for model in models:
27 bs_dic[model]=config['model_batchsize'][model]
28
29 print("=" * 30)
30 print('%-20s%s'%("Model", "batch_size"))
31 for model in models:
32 print('%-20s%s'%(model, bs_dic[model]))
33 print("=" * 30)
34 return stock_tf, bs_dic, models
35
36
37if __name__ == "__main__":

Callers 1

log_process.pyFile · 0.70

Calls 2

joinMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected