MCPcopy Create free account
hub / github.com/TencentARC/InstantMesh / on_fit_start

Method on_fit_start

train.py:97–107  ·  view source on GitHub ↗
(self, trainer, pl_module)

Source from the content-addressed store, hash-verified

95 self.config = config
96
97 def on_fit_start(self, trainer, pl_module):
98 if trainer.global_rank == 0:
99 # Create logdirs and save configs
100 os.makedirs(self.logdir, exist_ok=True)
101 os.makedirs(self.ckptdir, exist_ok=True)
102 os.makedirs(self.cfgdir, exist_ok=True)
103
104 rank_zero_print("Project config")
105 rank_zero_print(OmegaConf.to_yaml(self.config))
106 OmegaConf.save(self.config,
107 os.path.join(self.cfgdir, "project.yaml"))
108
109
110class CodeSnapshot(Callback):

Callers

nothing calls this directly

Calls 1

rank_zero_printFunction · 0.85

Tested by

no test coverage detected