hsahovic / poke-env

A python interface for training Reinforcement Learning bots to battle on pokemon showdown
https://poke-env.readthedocs.io/
MIT License
297 stars 103 forks source link

Keras-rl2==1.0.3 not compatible with any current hosted tensorflow #254

Open Travis-Barton opened 2 years ago

Travis-Barton commented 2 years ago

Hey all,

We are trying to run through the example: https://poke-env.readthedocs.io/en/latest/rl_with_open_ai_gym_wrapper.html#rl-with-open-ai-gym-wrapper

however, when we run the file, we get:

ValueError: Tensor Tensor("dense_2/BiasAdd:0", shape=(None, 22), dtype=float32) is not an element of this graph.

This is caused (we think) by the fact that we weren't using Keras-rl2==1.0.3. So we tried to downgrade but now Keras-rl2==1.0.3 is no longer compatible with TensorFlow 2.7 (it wants TensorFlow==2.0.0-beta however this is no longer hosted). Any idea what a workaround could be?

Travis-Barton commented 2 years ago
$pip install keras-rl2==1.0.3
Collecting keras-rl2==1.0.3
  Using cached keras-rl2-1.0.3.tar.gz (40 kB)
ERROR: Could not find a version that satisfies the requirement tensorflow==2.0.0-beta1 (from keras-rl2) (from versions: 0.12.1, 1.0.0, 1.1.0, 1.2.0, 1.2.1, 1.3.0, 1.4.0, 1.4.1, 1.5.0, 1.5.1, 1.6.0, 1.7.0, 1.7.1, 1.8.0, 1.9.0, 1.10.0, 1.10.1, 1.11.0, 1.12.0, 1.12.2, 1.12.3, 1.13.1, 1.13.2, 1.14.0, 1.15.0, 1.15.2, 1.15.3, 1.15.4, 1.15.5, 2.0.0, 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2.1.0, 2.1.1, 2.1.2, 2.1.3, 2.1.4, 2.2.0rc0, 2.2.0rc1, 2.2.0rc2, 2.2.0rc3, 2.2.0rc4, 2.2.0, 2.2.1, 2.2.2, 2.2.3, 2.3.0rc0, 2.3.0rc1, 2.3.0rc2, 2.3.0, 2.3.1, 2.3.2, 2.3.3, 2.3.4, 2.4.0rc0, 2.4.0rc1, 2.4.0rc2, 2.4.0rc3, 2.4.0rc4, 2.4.0, 2.4.1, 2.4.2, 2.4.3, 2.4.4, 2.5.0rc0, 2.5.0rc1, 2.5.0rc2, 2.5.0rc3, 2.5.0, 2.5.1, 2.5.2, 2.6.0rc0, 2.6.0rc1, 2.6.0rc2, 2.6.0, 2.6.1, 2.6.2)
ERROR: No matching distribution found for tensorflow==2.0.0-beta1
hsahovic commented 2 years ago

Hey @Travis-Barton,

Thanks for opening this issue, and sorry for the delay. I will try to find a workaround - alternatively I'll add an example with an up-to-date framework.

dakshjotwani commented 2 years ago

Hey - any updates on this? I'm running into the same issue

gregory-carlton commented 2 years ago

Has anyone found a fix for this yet?

akashsara commented 2 years ago

I don't remember where I got the files from but I put them into my repo so that I can set up the environment anywhere. Feel free to grab the wheel files from there and pip install them.

https://github.com/akashsara/meta-discovery/tree/main/tensorflow_2.0.0b1_whl

ghost commented 1 year ago

Hello,

@akashsara the link you shared expired, can you share it again if it is possible. Or is there any other solution we can use.

Thank you in advance.

akashsara commented 1 year ago

Hello,

@akashsara the link you shared expired, can you share it again if it is possible. Or is there any other solution we can use.

Thank you in advance.

Here you go: https://github.com/akashsara/meta-discovery/tree/keras_rl/tensorflow_2.0.0b1_whl