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

Improve missing optional dependency error #1989

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jonas-eschle
Copy link
Contributor

Two changes to improve the error message when an optional dependency is missing

  1. using an exception of the same type that was originally raised (i.e. ImportError or ModuleNotFoundError, but flexible), therefore not breaking any code. This allows to add a clear message and instruction. The previous print was printing before the stacktrace, obfuscating the actual instructions. Now they are prominently displayed.
  2. Extend the installation instructions for tf-keras for conda-forge, as we intend to make it an optional dependency there as well and conda does not offer the same optional dependencies as pypi does.

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.

1 participant