MCPcopy Create free account
hub / github.com/Inception3D/TTT3R / save_current_code

Function save_current_code

src/train.py:79–107  ·  view source on GitHub ↗
(outdir)

Source from the content-addressed store, hash-verified

77
78
79def save_current_code(outdir):
80 now = datetime.datetime.now() # current date and time
81 date_time = now.strftime("%m_%d-%H:%M:%S")
82 src_dir = "."
83 dst_dir = os.path.join(outdir, "code", "{}".format(date_time))
84 shutil.copytree(
85 src_dir,
86 dst_dir,
87 ignore=shutil.ignore_patterns(
88 ".vscode*",
89 "assets*",
90 "example*",
91 "checkpoints*",
92 "OLD*",
93 "logs*",
94 "out*",
95 "runs*",
96 "*.png",
97 "*.mp4",
98 "*__pycache__*",
99 "*.git*",
100 "*.idea*",
101 "*.zip",
102 "*.jpg",
103 "*.pth",
104 ),
105 dirs_exist_ok=True,
106 )
107 return dst_dir
108
109
110def train(args):

Callers 1

trainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected