We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f4a26ae commit 7078145Copy full SHA for 7078145
train.py
@@ -395,7 +395,13 @@ def main():
395
quantize_config=M.QuantizationConfig(),
396
)
397
else:
398
- nnue = torch.load(args.resume_from_model, weights_only=False)
+ assert os.path.exists(args.resume_from_model)
399
+ try:
400
+ nnue = torch.load(args.resume_from_model, weights_only=False)
401
+ except ModuleNotFoundError as e:
402
+ raise RuntimeError(
403
+ f"Could not load checkpoint: {e}. The model to be resumed was probably saved with a different version of the code."
404
+ )
405
nnue.model.set_feature_set(feature_set)
406
nnue.loss_params = loss_params
407
nnue.max_epoch = max_epoch
0 commit comments