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

Method copy

tools/evaluation_model_parallelism.py:35–43  ·  view source on GitHub ↗
(self, src_list, dst_dir)

Source from the content-addressed store, hash-verified

33 self.port = port
34
35 def copy(self, src_list, dst_dir):
36 assert isinstance(src_list, list), "code issue happened!!"
37 assert isinstance(dst_dir, str), "code issue happened!!"
38 for src in src_list:
39 cmd = 'rsync --progress -a -e "ssh -p {}" {} {}@{}:{}'.format(
40 self.port, src, self.login_name, self.ip, dst_dir
41 )
42 logging.debug("ssh run cmd: {}".format(cmd))
43 subprocess.check_call(cmd, shell=True)
44
45 def cmd(self, cmd):
46 output = ""

Callers 1

mainFunction · 0.95

Calls 1

formatMethod · 0.45

Tested by

no test coverage detected