Closed Pranav-India closed 3 years ago
If you run a file with python just containing
import tensorflow as tf tf.function
what do you get?
tf.version
'1.9.0'
tf.function
Traceback (most recent call last):
File "
It looks like your Sonnet version is too new. You could try and use a newer version of TF but can't guarantee the IMPALA code works if doing that.
It does not I tried that I have 2 venvs one with tf 1.9.0 other with 2.4 IMPALA does not work there , I converted all the files to tf2 removed all the tf.contrib as it does not support the tf2 version but still IMPALA is not working there. do you know if it is possible to use older version of sonnet
If I run it with tf 2.4 and other codes updated using tf_upgrade_v2 then I get
import py_process
File "/home/pranav/scalable_agent/py_process.py", line 186, in
Error
Yes that will work:
https://github.com/deepmind/scalable_agent/blob/master/Dockerfile#L38
ok thanks I will try that
Hi @lespeholt thank you for your help that issue is solved but now I have received this error
WARNING:tensorflow:Running without dynamic batching.
2021-01-07 16:26:08.567726: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2021-01-07 16:26:08.569123: I tensorflow/core/distributed_runtime/rpc/grpc_channel.cc:215] Initialize GrpcChannelCache for job local -> {0 -> localhost:43601}
2021-01-07 16:26:08.569713: I tensorflow/core/distributed_runtime/rpc/grpc_server_lib.cc:334] Started server with target: grpc://localhost:43601
INFO:tensorflow:Creating actor 0 with level explore_goal_locations_small
INFO:tensorflow:Creating actor 1 with level explore_goal_locations_small
INFO:tensorflow:Creating MonitoredSession, is_chief True
INFO:tensorflow:Create CheckpointSaverHook.
WARNING:tensorflow:Issue encountered when serializing py_process_processes.
Type is unsupported, or the types of the items don't match field type in CollectionDef. Note this is a warning and probably safe to ignore.
'PyProcess' object has no attribute 'name'
INFO:tensorflow:Starting all processes.
Traceback (most recent call last):
File "experiment.py", line 700, in
I found that "Python 3 renamed dict.iteritems -> dict.items" but where have we used the dict.iteritems
I found the files it is environment and in dmlab if we change them to dict, code works. Thank you.
Great :-)
Hi @lespeholt
I just wanted to know where we have defined the neural network in these codes ( I am unable to understand the how algorithm is working ) like in A2C we have actor-critic networks and then we optimise that model(Neural Network) , I am not able to find the model here.
Also is there some forum or discussion group where I can ask my doubts about IMPALA . I am not able to find resources other than the paper so if you could point me somewhere that will be of a great help.
Thanks!
I have created venv and in that ,I am using TensorFlow version 1.9.0 when I try to run the experiment.py with 2 actors and 10 batch size it shows me the error given below what should I do?
Traceback (most recent call last): File "experiment.py", line 31, in
import sonnet as snt
File "/home/pranav/tf_1/lib/python3.6/site-packages/sonnet/init.py", line 21, in
from sonnet import distribute
File "/home/pranav/tf_1/lib/python3.6/site-packages/sonnet/distribute.py", line 21, in
from sonnet.src.distribute.batch_norm import CrossReplicaBatchNorm
File "/home/pranav/tf_1/lib/python3.6/site-packages/sonnet/src/distribute/batch_norm.py", line 22, in
from sonnet.src import batch_norm
File "/home/pranav/tf_1/lib/python3.6/site-packages/sonnet/src/batch_norm.py", line 22, in
from sonnet.src import base
File "/home/pranav/tf_1/lib/python3.6/site-packages/sonnet/src/base.py", line 37, in
TFFunctionType = type(tf.function(lambda: None, autograph=False)) # pylint: disable=invalid-name
AttributeError: module 'tensorflow' has no attribute 'function'
I know sonnet is build on top of tensorflow 2 but if I use tf2 then tf.contirb does not work