This PR adds error logs to the training loop in the PyTorch model. It ensures that any exceptions that occur during the training process are caught and logged, providing meaningful information for debugging.
Summary of Changes
Imported the logging module in src/main.py.
Set up the basic configuration for the logger.
Added a try-except block in the training loop to catch exceptions.
Logged the exceptions with detailed information including the type, error message, and stack trace.
Ensured that the logging does not interfere with the normal execution of the code.
Please review and merge this PR. Thank you!
Fixes #1.
🎉 Latest improvements to Sweep:
Sweep can now passively improve your repository! Check out Rules to learn more.
💡 To get Sweep to edit this pull request, you can:
Comment below, and Sweep can edit the entire PR
Comment on a file, Sweep will only modify the commented file
Edit the original issue to get Sweep to recreate the PR from scratch
Description
This PR adds error logs to the training loop in the PyTorch model. It ensures that any exceptions that occur during the training process are caught and logged, providing meaningful information for debugging.
Summary of Changes
src/main.py
.Please review and merge this PR. Thank you!
Fixes #1.
🎉 Latest improvements to Sweep:
💡 To get Sweep to edit this pull request, you can: