probability icon indicating copy to clipboard operation
probability copied to clipboard

Improve missing optional dependency error

Open jonas-eschle opened this issue 1 year ago • 0 comments

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.

jonas-eschle avatar Feb 06 '25 19:02 jonas-eschle