Skip to content
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

replace catches of the ImportError exception with the more specific ModuleNotFoundError exception #733

Merged
merged 2 commits into from
Apr 2, 2024

Conversation

paulbkoch
Copy link
Collaborator

This should partly address #690 where it appears the import of llama-cpp is generating an ImportError exception that is not due to the module not being installed. This more specific exception will only catch the specific case of the Module not being installed and will leave other exceptions to propagate to the user with more descriptive errors.

@paulbkoch
Copy link
Collaborator Author

The test failures seem unrelated to this PR as another unrelated PR seems to be failing on the same tests.

@paulbkoch paulbkoch self-assigned this Apr 2, 2024
@codecov-commenter
Copy link

codecov-commenter commented Apr 2, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 7 lines in your changes are missing coverage. Please review.

Project coverage is 65.47%. Comparing base (94744ea) to head (0259417).

Files Patch % Lines
guidance/models/_model.py 0.00% 2 Missing ⚠️
guidance/models/_azure_openai.py 0.00% 1 Missing ⚠️
guidance/models/_cohere.py 0.00% 1 Missing ⚠️
guidance/models/_openai.py 0.00% 1 Missing ⚠️
guidance/models/llama_cpp/_llama_cpp.py 0.00% 1 Missing ⚠️
guidance/models/transformers/_transformers.py 0.00% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #733      +/-   ##
==========================================
- Coverage   69.17%   65.47%   -3.70%     
==========================================
  Files          53       53              
  Lines        3951     3951              
==========================================
- Hits         2733     2587     -146     
- Misses       1218     1364     +146     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@paulbkoch paulbkoch merged commit cd98ae5 into guidance-ai:main Apr 2, 2024
80 checks passed
@paulbkoch paulbkoch deleted the module-not-found branch April 2, 2024 05:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants