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
Issue: Common Import Problem with CRP and Zennit 0.4.6
Background
The CRP package currently enforces the use of zennit==0.4.6, while the latest version of zennit is 0.5.1. Users following the latest Zennit documentation may encounter import errors due to changes in how packages are loaded.
Problem
In the update from Zennit 0.4.6 to 0.4.7, there was a commit that modified the __init__.py file to import all modules of the Zennit package into the Zennit namespace. This change allows for importing modules like ResNetCanonizer directly:
Update CRP Requirements: Consider updating CRP to require zennit>=0.4.7 to ensure compatibility with the latest Zennit practices and documentation.
Documentation Update: Add a note in the CRP documentation to inform users about this import issue and the temporary workaround until the package requirements are updated.
Issue: Common Import Problem with CRP and Zennit 0.4.6
Background
The CRP package currently enforces the use of
zennit==0.4.6
, while the latest version of zennit is 0.5.1. Users following the latest Zennit documentation may encounter import errors due to changes in how packages are loaded.Problem
In the update from Zennit 0.4.6 to 0.4.7, there was a commit that modified the
__init__.py
file to import all modules of the Zennit package into the Zennit namespace. This change allows for importing modules likeResNetCanonizer
directly:However, in version 0.4.6, which CRP currently enforces, this import leads to the following error:
This error occurs because the
torchvision
module is not loaded in Zennit's__init__.py
in version 0.4.6.Solution
To prevent this error, explicitly import the
zennit.torchvision
module as follows:For more information on Python namespaces and module imports, refer to the Python tutorial on namespaces.
Suggestions for Resolution
zennit>=0.4.7
to ensure compatibility with the latest Zennit practices and documentation.@rachtibat
The text was updated successfully, but these errors were encountered: