-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handling exceptions #4
Comments
Expected behaviors should be agreed upon before we change our code to handle exceptions. This is a summary of how I think the program throws an exception during certain actions. Warnings should notify the user that the action couldn't be completed, such as an image not being able to be used for various reasons, then continue running with the rest of the data. Failures should notify the user and terminate the program. images_to_samples.py
train_model.py
image_classification.py
|
After discussion with ymoisan, we should set a limit to the number of warnings that we give. Once the threshold has been exceeded, the program should throw an exception and terminate. We would do this in case of systematic user error, for example trying to load images only in pdf format or having a different band number or number of classes in the config.yaml compared to the images in use. |
Relevant exceptions are being implemented ad hoc. |
Add Try blocks to the code to handle exceptions where needed.
Interesting references:
https://www.pythonforthelab.com/blog/learning-not-to-handle-exceptions/
https://www.tutorialspoint.com/python/python_exceptions.htm
The text was updated successfully, but these errors were encountered: