Closed johann-petrak closed 2 years ago
Fixed for the client modules
Visualization: this happens because of the way how we currently map document formats to the classes that handle the format in the serialization/default module: currently we import all classes and then map the methods for saving/loading. Importing all classes requires all the packages each of the classes requires.
Possible ways to fix this:
For now, the first solution looks like the better option.
If running under starboard (starboard.gg) and displaying a doc:
Traceback (most recent call last):
File "/lib/python3.9/site-packages/gatenlp/[document.py](http://document.py/)", line 877, in _repr_html_
if in_colab():
File "/lib/python3.9/site-packages/gatenlp/[utils.py](http://utils.py/)", line 298, in in_colab
from IPython.core import getipython
ModuleNotFoundError: No module named 'IPython'
Make sure we do not unintentionally depend on an extra which might not be installed.
There are several possible ways how this could happen:
__init__.py
for convenience, but this makes us depend on the union of packages required by all those classes. Instead: only allow to import those classes directly from their own modules