Issues using Sonnet

Aperta
#261 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
python, tensorflow

Direzione di ricerca

Inizia riproducendo gli errori di importazione da src/dnc_model.py attraverso i file DNC dnc.py, access.py e addressing.py, quindi esamina sonnet/init.py nel pacchetto installato. Confronta le versioni di Sonnet e DNC coinvolte, quindi determina se l’esito documentato debba essere la compatibilità, un percorso di migrazione o un’incompatibilità esplicita.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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?

Lingua principale
Python
Stelle
10k
Fork
1.3k
Merge medio
50m
PR unite (30g)
1

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di google-deepmind/sonnet

Tutte le issue di google-deepmind/sonnet

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.