google-deepmind / google-deepmind/sonnet
Issues using Sonnet
- Dominant language
- Python
- Stars
- 10k
- Forks
- 1.3k
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
I'm having an issue attempting to run a project dependent on Sonnet (more specifically, the DeepMind [DNC](https://github.com/deepmind/dnc) implementation). I'm getting the error:
```
Traceback (most recent call last):
File "PATH\src\dnc_model.py", line 7, in
from dnc import dnc
File "PATH\libs\dnc\dnc\dnc.py", line 27, in
import sonnet as snt
File "C:\Users\USER\AppData\Local\Programs\Python\Python39\lib\site-packages\sonnet\__init__.py", line 2, in
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
from dnc import dnc
File "PATH\libs\dnc\dnc\dnc.py", line 30, in
from dnc import access
File "PATH\libs\dnc\dnc\access.py", line 25, in
from dnc import addressing
File "PATH\libs\dnc\dnc\addressing.py", line 58, in
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?
Contributor guide
Assessment
This issue has not been assessed yet.