⚡ ULTRON: Sync train.py
Browse files98 unmodified lines9910010110210310410598 unmodified linesif os.path.exists(latest_path):print(f"⚡ [ULTRON] Found existing checkpoint at {latest_path}. Resuming state...")try:ckpt = torch.load(latest_path, map_location=self.device)self.model.load_state_dict(ckpt["model_state"])self.optimizer.load_state_dict(ckpt["optimizer_state"])if "scaler_state" in ckpt and self.scaler.is_enabled():98 unmodified lines9910010110210310410598 unmodified linesif os.path.exists(latest_path):print(f"⚡ [ULTRON] Found existing checkpoint at {latest_path}. Resuming state...")try:ckpt = torch.load(latest_path, map_location=self.device, weights_only=False)self.model.load_state_dict(ckpt["model_state"])self.optimizer.load_state_dict(ckpt["optimizer_state"])if "scaler_state" in ckpt and self.scaler.is_enabled():
train.py+1-1