MCPcopy
hub / github.com/jindongwang/transferlearning / sweep

Function sweep

code/clip/main.py:87–100  ·  view source on GitHub ↗
(model=-1, data=-1)

Source from the content-addressed store, hash-verified

85
86
87def sweep(model=-1, data=-1):
88 m_sweep_index, d_sweep_index = sweep_index(model, data)
89 if args.result:
90 model_name_lst = [ClipModel.get_model_name_by_index(i) for i in m_sweep_index]
91 data_name_lst = [ImageTextData.get_data_name_by_index(i) for i in d_sweep_index]
92 res = gather_res(model_name_lst, data_name_lst)
93 for line in res:
94 print(line)
95 else:
96 for model in m_sweep_index:
97 for data in d_sweep_index:
98 args.model = model
99 args.dataset = data
100 main(args)
101
102
103if __name__ == '__main__':

Callers 1

main.pyFile · 0.70

Calls 5

gather_resFunction · 0.90
sweep_indexFunction · 0.85
mainFunction · 0.70

Tested by

no test coverage detected