google-research / football

Check out the new game server:
https://research-football.dev
Apache License 2.0
3.35k stars 1.29k forks source link

Traning does not work with latest tensorflow #318

Open aznSlayer opened 2 years ago

aznSlayer commented 2 years ago

Hey there, I'm currently using tensorflow 2.8.0 and python 3.8.10 and I'm unable to run training:

Traceback (most recent call last): File "/home/ubuntu/.local/lib/python3.8/site-packages/tensorflow/python/autograph/impl/api.py", line 771, in to_graph return autograph_artifact(_convert_actual(entity, program_ctx)) File "/home/ubuntu/.local/lib/python3.8/site-packages/tensorflow/python/autograph/impl/api.py", line 269, in _convert_actual transformed, module, source_map = _TRANSPILER.transform(entity, program_ctx) File "/home/ubuntu/.local/lib/python3.8/site-packages/tensorflow/python/autograph/pyct/transpiler.py", line 282, in transform return self.transform_function(obj, user_context) File "/home/ubuntu/.local/lib/python3.8/site-packages/tensorflow/python/autograph/pyct/transpiler.py", line 466, in transform_function nodes, ctx = super(PyToPy, self).transform_function(fn, user_context) File "/home/ubuntu/.local/lib/python3.8/site-packages/tensorflow/python/autograph/pyct/transpiler.py", line 359, in transform_function result = self.transform_ast(node, context) File "/home/ubuntu/.local/lib/python3.8/site-packages/tensorflow/python/autograph/impl/api.py", line 237, in transform_ast node = self.initial_analysis(node, ctx) File "/home/ubuntu/.local/lib/python3.8/site-packages/tensorflow/python/autograph/impl/api.py", line 224, in initial_analysis node = qual_names.resolve(node) File "/home/ubuntu/.local/lib/python3.8/site-packages/tensorflow/python/autograph/pyct/qual_names.py", line 260, in resolve return QnResolver().visit(node) File "/usr/lib/python3.8/ast.py", line 371, in visit return visitor(node) File "/usr/lib/python3.8/ast.py", line 456, in generic_visit new_node = self.visit(old_value) File "/usr/lib/python3.8/ast.py", line 371, in visit return visitor(node) File "/usr/lib/python3.8/ast.py", line 447, in generic_visit value = self.visit(value) File "/usr/lib/python3.8/ast.py", line 371, in visit return visitor(node) File "/home/ubuntu/.local/lib/python3.8/site-packages/tensorflow/python/autograph/pyct/qual_names.py", line 225, in visit_Name node = self.generic_visit(node) File "/usr/lib/python3.8/ast.py", line 456, in generic_visit new_node = self.visit(old_value) File "/usr/lib/python3.8/ast.py", line 371, in visit return visitor(node) File "/home/ubuntu/.local/lib/python3.8/site-packages/tensorflow/python/autograph/pyct/qual_names.py", line 244, in visit_Subscript if isinstance(s, gast.Constant) and s.value != Ellipsis: AttributeError: module 'gast' has no attribute 'Constant'

tensorflow 1.15.0 isn't available for Python 3.8 and if I downgraded to Python 3.7, I get a bunch of other errors. Anyone able to run training with tensorflow 2.*?

fighting-zz commented 2 years ago

hello, have you solved this issue?

fighting-zz commented 2 years ago

Hey there, I'm currently using tensorflow 2.8.0 and python 3.8.10 and I'm unable to run training:

Traceback (most recent call last): File "/home/ubuntu/.local/lib/python3.8/site-packages/tensorflow/python/autograph/impl/api.py", line 771, in to_graph return autograph_artifact(_convert_actual(entity, program_ctx)) File "/home/ubuntu/.local/lib/python3.8/site-packages/tensorflow/python/autograph/impl/api.py", line 269, in _convert_actual transformed, module, source_map = _TRANSPILER.transform(entity, program_ctx) File "/home/ubuntu/.local/lib/python3.8/site-packages/tensorflow/python/autograph/pyct/transpiler.py", line 282, in transform return self.transform_function(obj, user_context) File "/home/ubuntu/.local/lib/python3.8/site-packages/tensorflow/python/autograph/pyct/transpiler.py", line 466, in transform_function nodes, ctx = super(PyToPy, self).transform_function(fn, user_context) File "/home/ubuntu/.local/lib/python3.8/site-packages/tensorflow/python/autograph/pyct/transpiler.py", line 359, in transform_function result = self.transform_ast(node, context) File "/home/ubuntu/.local/lib/python3.8/site-packages/tensorflow/python/autograph/impl/api.py", line 237, in transform_ast node = self.initial_analysis(node, ctx) File "/home/ubuntu/.local/lib/python3.8/site-packages/tensorflow/python/autograph/impl/api.py", line 224, in initial_analysis node = qual_names.resolve(node) File "/home/ubuntu/.local/lib/python3.8/site-packages/tensorflow/python/autograph/pyct/qual_names.py", line 260, in resolve return QnResolver().visit(node) File "/usr/lib/python3.8/ast.py", line 371, in visit return visitor(node) File "/usr/lib/python3.8/ast.py", line 456, in generic_visit new_node = self.visit(old_value) File "/usr/lib/python3.8/ast.py", line 371, in visit return visitor(node) File "/usr/lib/python3.8/ast.py", line 447, in generic_visit value = self.visit(value) File "/usr/lib/python3.8/ast.py", line 371, in visit return visitor(node) File "/home/ubuntu/.local/lib/python3.8/site-packages/tensorflow/python/autograph/pyct/qual_names.py", line 225, in visit_Name node = self.generic_visit(node) File "/usr/lib/python3.8/ast.py", line 456, in generic_visit new_node = self.visit(old_value) File "/usr/lib/python3.8/ast.py", line 371, in visit return visitor(node) File "/home/ubuntu/.local/lib/python3.8/site-packages/tensorflow/python/autograph/pyct/qual_names.py", line 244, in visit_Subscript if isinstance(s, gast.Constant) and s.value != Ellipsis: AttributeError: module 'gast' has no attribute 'Constant'

tensorflow 1.15.0 isn't available for Python 3.8 and if I downgraded to Python 3.7, I get a bunch of other errors. Anyone able to run training with tensorflow 2.*?

hello, have you solevd this issue?