Skip to content

Issues using Sonnet #261

@TheMoxyFoxy

Description

@TheMoxyFoxy

Hello,

I'm having an issue attempting to run a project dependent on Sonnet (more specifically, the DeepMind DNC implementation). I'm getting the error:

Traceback (most recent call last):
  File "PATH\src\dnc_model.py", line 7, in <module>
    from dnc import dnc
  File "PATH\libs\dnc\dnc\dnc.py", line 27, in <module>
    import sonnet as snt
  File "C:\Users\USER\AppData\Local\Programs\Python\Python39\lib\site-packages\sonnet\__init__.py", line 2, in <module>
    from graphs import Sonnet, D3Graph, MatplotGraph
ModuleNotFoundError: No module named 'graphs'

Thinking that maybe I'm missing a package, I did the next obvious thing and ran pip install graphs (which I felt is not the solution, that graphs must be an internal package of sorts, but I still gave it a shot) and got the error ImportError: cannot import name 'Sonnet' from 'graphs'

I thought that maybe the version on pip is outdated, and it seems like it is. I then attempted to download the source code and run pip install -e on the extracted folder. However, after that, I get:

Traceback (most recent call last):
  File "PATH\src\dnc_model.py", line 7, in <module>
    from dnc import dnc
  File "PATH\libs\dnc\dnc\dnc.py", line 30, in <module>
    from dnc import access
  File "PATH\libs\dnc\dnc\access.py", line 25, in <module>
    from dnc import addressing
  File "PATH\libs\dnc\dnc\addressing.py", line 58, in <module>
    class CosineWeights(snt.AbstractModule):
AttributeError: module 'sonnet' has no attribute 'AbstractModule'

Does anyone have any idea what I could do to solve these issues? Is there a way I could modify the DNC code to work with modern Sonnet? Is there an alternative to AbstractModule in this use case?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions