MCPcopy Create free account
hub / github.com/DragonisCV/RAM / copy_opt_file

Function copy_opt_file

ram/utils/options.py:241–254  ·  view source on GitHub ↗
(opt_file, experiments_root)

Source from the content-addressed store, hash-verified

239
240@master_only
241def copy_opt_file(opt_file, experiments_root):
242 # copy the yml file to the experiment root
243 import sys
244 import time
245 from shutil import copyfile
246 cmd = ' '.join(sys.argv)
247 filename = osp.join(experiments_root, osp.basename(opt_file))
248 copyfile(opt_file, filename)
249
250 with open(filename, 'r+') as f:
251 lines = f.readlines()
252 lines.insert(0, f'# GENERATE TIME: {time.asctime()}\n# CMD:\n# {cmd}\n\n')
253 f.seek(0)
254 f.writelines(lines)

Callers 1

train_pipelineFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected