Skip to content

Bug : model.py & utils.py – Unhandled Exceptions on Model Load#1853

Merged
omroy07 merged 1 commit into
omroy07:mainfrom
Aditya8369:144
Jun 1, 2026
Merged

Bug : model.py & utils.py – Unhandled Exceptions on Model Load#1853
omroy07 merged 1 commit into
omroy07:mainfrom
Aditya8369:144

Conversation

@Aditya8369
Copy link
Copy Markdown
Contributor

I have completed the work to fix the unhandled exceptions on ML model load and prediction.

Here is a summary of what was accomplished:

Error Handling Implementation: Wrapped the model loading and inference logic in utils.py and model.py (both in the root directory and in the Disease prediction/ directory) inside try/except blocks.
Graceful Fallbacks: Enabled safe log reporting of errors and defined controlled/controlled fallback outputs (e.g. "Model unavailable") when model loading fails.
Stub Configuration Fix: Resolved a namespace collision in tests/conftest.py that was blocking standard google module imports like google.protobuf used by TensorFlow.
Verification: Added 5 unit tests in tests/test_predictions.py covering all the modified loading and inference scenarios, and confirmed that they all pass successfully.

closes #144

@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 1, 2026

@Aditya8369 is attempting to deploy a commit to the Om Roy's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 1, 2026

Thanks for creating a PR for your Issue! ☺️

We'll review it as soon as possible.
In the meantime, please double-check the file changes and ensure that all commits are accurate.

If there are any unresolved review comments, feel free to resolve them. 🙌🏼

@Aditya8369
Copy link
Copy Markdown
Contributor Author

@omroy07 please merge under NSOC

@omroy07 omroy07 merged commit 0f95be2 into omroy07:main Jun 1, 2026
1 of 4 checks passed
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 1, 2026

🎉 Congrats @Aditya8369 on getting your PR merged! 🙌
Thanks for the contribution — looking forward to more from you 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug : model.py & utils.py – Unhandled Exceptions on Model Load/Prediction

2 participants