Fix tensorf chkpt loading (#1266)

* setting tensorf default from wandb to viewer

* adding functionality to adjust model depending on the step of the checkpoint that is loaded

* cleaning code

* bug fix

* fixing style
This commit is contained in:
Terrance Wang authored and GitHub committed 2023-01-20 12:00:51 -08:00
1 parent 9eb880aa91
commit 73bffe058f
4 files changed
+29 -4

No files matched your search

+1 -1
View File
@@ -315,7 +315,7 @@ class Trainer:
loaded_state = torch.load(load_path, map_location="cpu")
self._start_step = loaded_state["step"] + 1
# load the checkpoints for pipeline, optimizers, and gradient scalar
self.pipeline.load_pipeline(loaded_state["pipeline"])
self.pipeline.load_pipeline(loaded_state["pipeline"], loaded_state["step"])
self.optimizers.load_optimizers(loaded_state["optimizers"])
self.grad_scaler.load_state_dict(loaded_state["scalers"])
CONSOLE.print(f"done loading checkpoint from {load_path}")