Apply gradients with distributed_shampoo fails
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- python, tensorflow
- Ambito
- backend, machine-learning
Direzione di ricerca
The traceback points to lingvo/core/distributed_shampoo.py, in _create_slots around line 336, where a TensorFlow variable is used as a dictionary key. Start by reading that method and the TensorFlow 2.7 variable hashing behavior described by the error. Confirm the failure with the reported apply_gradients() call; done means distributed shampoo applies gradients successfully with TensorFlow 2.7.1.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Hello,
I am trying to run distributed shampoo implemented in lingvo. I have the compatible tensorflow version with lignvo.
Python 3.8.12 | packaged by conda-forge | (default, Oct 12 2021, 21:59:51)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
>>> tf.__version__
'2.7.1'
>>>
But when I do opt.apply_gradients(), it throws an error about tf.variable being unhashable. apply_gradients() works fine with other optimizers.
File "program.py", line 177, in train_step
optimizer.apply_gradients(
File "/home/ubuntu/anaconda3/envs/tensorflow2_p38/lib/python3.8/site-packages/tensorflow/python/training/optimizer.py", line 605, in apply_gradients
self._create_slots(var_list)
File "/home/ubuntu/anaconda3/envs/tensorflow2_p38/lib/python3.8/site-packages/lingvo/core/distributed_shampoo.py", line 336, in _create_slots
self._partitioner_metadata[v] = TensorPartitioner.partition_metadata(
File "/home/ubuntu/anaconda3/envs/tensorflow2_p38/lib/python3.8/site-packages/tensorflow/python/ops/variables.py", line 1085, in __hash__
raise TypeError(
TypeError: Variable is unhashable. Instead, use variable.ref() as the key. (Variable: <tf.Variable 'conv2d_23/kernel:0' shape=(7, 7, 8, 32) dtype=float32, numpy=
array([[[[-6.29460454e-01, -4.73986834e-01, -3.37867022e-01, ...,
5.98385096e-01, -1.81423143e-01, 4.59209830e-02],
[ 1.96352646e-01, -1.11289904e-01, 3.36863637e-01, ...,
Appreciate any help to fix the issue.
- Lingua principale
- Python
- Stelle
- 2.9k
- Fork
- 452
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di tensorflow/lingvo
-
About inverseAugAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
tensorflow/lingvo#370 · 1 commento ·
-
Difficoltà 4/5 1-2 giorni Idoneità per principianti 35/100
tensorflow/lingvo#359 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 15/100
tensorflow/lingvo#356 · 5 reazioni ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
tensorflow/lingvo#333 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
tensorflow/lingvo#332 · 1 commento ·
Tutte le issue di tensorflow/lingvo
Issue simili
-
[Bug]: Python SDK overwrites OVPack backups with HTTP 200 JSON errorsForse già presa @stefanielizeth73-art l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
volcengine/OpenViking#7347 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
duolicious/duolicious#1943 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
fedora-infra/anitya#2166 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
NVIDIA/auto-ontology#486 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 69/100
NVIDIA/SkillEvaluator#446 ·
I maintainer di solito rispondono entro 2 giorni