String “best” at argument “ckpt_path” for test method of Trainer class #9836
-
Hi, The
Also, in the documentation of PyTorch Lightning for the test set, using Trainer, there is the following: # run full training
trainer.fit(model)
# (1) load the best checkpoint automatically (lightning tracks this for you)
trainer.test(ckpt_path="best") My question is, according to what the "best" checkpoint is decided? That is, is the "best" decided on maximising or minimising some value? What would be that value? Can someone configure the policy (i.e. minimising or maximising) and the value? How one should use this "best" string? Links for reference: P.S. Please note that I'm not referring to using the |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
it actually relies on |
Beta Was this translation helpful? Give feedback.
-
One more question. Would that work when using |
Beta Was this translation helpful? Give feedback.
it actually relies on
ModelCheckpoint
callback only https://github.com/PyTorchLightning/pytorch-lightning/blob/b3e9dff32d842431b067b0ab83e508ffe3262968/pytorch_lightning/trainer/trainer.py#L1268-L1280so if there is no
ModelCheckpoint
callback it will raise an error