mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-03 06:18:44 +08:00
Add flag to kill training when complete (#948)
This commit is contained in:
1 parent
36b514fc20
commit
50f9895f1a
2 files changed
+7
-2
No files matched your search
@@ -131,6 +131,7 @@ class Trainer:
|
||||
self._init_viewer_state()
|
||||
with TimeWriter(writer, EventName.TOTAL_TRAIN_TIME):
|
||||
num_iterations = self.config.trainer.max_num_iterations
|
||||
step = 0
|
||||
for step in range(self._start_step, self._start_step + num_iterations):
|
||||
with TimeWriter(writer, EventName.ITER_TRAIN_TIME, step=step) as train_t:
|
||||
|
||||
@@ -174,10 +175,12 @@ class Trainer:
|
||||
writer.write_out_storage()
|
||||
# save checkpoint at the end of training
|
||||
self.save_checkpoint(step)
|
||||
|
||||
CONSOLE.rule()
|
||||
CONSOLE.print("[bold green]:tada: :tada: :tada: Training Finished :tada: :tada: :tada:", justify="center")
|
||||
CONSOLE.print("Use ctrl+c to quit", justify="center")
|
||||
self._always_render(step)
|
||||
if not self.config.viewer.quit_on_train_completion:
|
||||
CONSOLE.print("Use ctrl+c to quit", justify="center")
|
||||
self._always_render(step)
|
||||
|
||||
@check_main_thread
|
||||
def _always_render(self, step):
|
||||
|
||||
Reference in new issue
Block a user