MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / copy

Method copy

tools/cpu_evaluation_tools.py:48–56  ·  view source on GitHub ↗
(self, src_list, dst_dir)

Source from the content-addressed store, hash-verified

46 self.port = port
47
48 def copy(self, src_list, dst_dir):
49 assert isinstance(src_list, list), "code issue happened!!"
50 assert isinstance(dst_dir, str), "code issue happened!!"
51 for src in src_list:
52 cmd = 'rsync --progress -a -e "ssh -p {}" {} {}@{}:{}'.format(
53 self.port, src, self.login_name, self.ip, dst_dir
54 )
55 logging.debug("ssh run cmd: {}".format(cmd))
56 subprocess.check_call(cmd, shell=True)
57
58 def cmd(self, cmd):
59 output = ""

Callers 1

mainFunction · 0.95

Calls 1

formatMethod · 0.45

Tested by

no test coverage detected