I have trained a few NLP models, measured their performances and now I want to create a final model for production trained with all the data I have available.

I'm working in text classification and I'm using transformers with the library PyTorch Lightning. The issue here is that I can't find an example of how to turn off the validation step (with pytorch lightning) and after several google searches I was not able to find discussions about that.

So, now I'm having second thoughts and questioning if I'm thinking correctly. Is it common practice to train the production model with the full dataset without the validation? Or should I just use the best model I have already trained? If so, why?


The last step for production models is typically to train with the entire set (train + validation) after tuning the hyperparameters using the validation set(s). The difference is typically not too drastic as the validation set should only be a fraction of the dataset but more data is always helpful especially for DL-based models.

I'm not familiar with the library you are using but perhaps you could just set the validation data to 0 and ignore the evaluation it prints.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.