You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When merging @Tara-Lakshmipathy's additions to the pyiron_nodes library without installing all necessary Python modules (in this case fenics), all nodes failed. The reason is that although only one module needs this library, all modules are imported via the import statements in the init.py files. A simple fix would be to remove these imports, but then autocompletion in Jupyter notebooks will not work. The GUI is not affected (since I used lazy loading there), but for the code input this is not acceptable.
An obvious solution would be to put all heavy modules into the node functions. However, this only works to a certain extent, since type hinting often requires such modules to be loaded (e.g. ase for the atom type). This difficulty in combining autocompletion and lazy import seems to be a fundamental problem in Python, and there are long discussions about it without a good solution. Suggestions/ideas are welcome. We should also address this issue in our strategy meeting.
The text was updated successfully, but these errors were encountered:
When merging @Tara-Lakshmipathy's additions to the pyiron_nodes library without installing all necessary Python modules (in this case fenics), all nodes failed. The reason is that although only one module needs this library, all modules are imported via the import statements in the init.py files. A simple fix would be to remove these imports, but then autocompletion in Jupyter notebooks will not work. The GUI is not affected (since I used lazy loading there), but for the code input this is not acceptable.
An obvious solution would be to put all heavy modules into the node functions. However, this only works to a certain extent, since type hinting often requires such modules to be loaded (e.g. ase for the atom type). This difficulty in combining autocompletion and lazy import seems to be a fundamental problem in Python, and there are long discussions about it without a good solution. Suggestions/ideas are welcome. We should also address this issue in our strategy meeting.
The text was updated successfully, but these errors were encountered: