Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not find a version that satisfies the requirement tensorflow<1.16,>=1.15 #39

Open
nbro opened this issue Oct 6, 2020 · 9 comments

Comments

@nbro
Copy link

nbro commented Oct 6, 2020

This problem may not be related to this specific package, but it can happen if you install this package, so I am opening the issue here too.

When I try to install this package with pip (version 19.0.3 with Python 3.8), I get the error

Could not find a version that satisfies the requirement tensorflow<1.16,>=1.15 (from evaluating-rewards==0.1.1) (from versions: 2.2.0rc3, 2.2.0rc4, 2.2.0, 2.2.1, 2.3.0rc0, 2.3.0rc1, 2.3.0rc2, 2.3.0, 2.3.1)
No matching distribution found for tensorflow<1.16,>=1.15 (from evaluating-rewards==0.1.1)

I am using a 64-bit version of Python on a Mac OS Catalina (10.15.7). Meanwhile, this problem seems to be temporarily solved by changing the specific version of TensorFlow that is installed in the requirement.txt file to tensorflow==2.3.0. However, I have not confirmed that this problem is solved because I was not yet able to run any code in this repo, given that we apparently also need mojuco as a requirement for this package, but mojuco requires a license, and that's quite annoying.

@AdamGleave
Copy link
Member

You should be able to run most of the code without MuJoCo, you can just change gym[mujoco] to gym. Most the environments in the paper require MuJoCo though so you won't be able to replicate the results.

I doubt it'll work with TensorFlow 2 though, perhaps if you put it into v1 compatibility mode. Eventually I hope to port to TFv2 or PyTorch, but that's a big job and isn't a priority right now. Try Python 3.7 -- I think there are pip wheels for TensorFlow 1.15 for that.

@nbro
Copy link
Author

nbro commented Oct 6, 2020

@AdamGleave Porting the code to TensorFlow 2 should not take that much time, given there are already scripts that automate this process to some extent, so I think you should really do it (if you have some time). I will see what I can do meanwhile.

@AdamGleave
Copy link
Member

@AdamGleave Porting the code to TensorFlow 2 should not take that much time, given there are already scripts that automate this process to some extent, so I think you should really do it (if you have some time). I will see what I can do meanwhile.

"Should" being the key word there.

One major complication is that the RL library we use, Stable Baselines, is TFv1 or PyTorch (but no TFv2).

I'd welcome a PR starting on a port, but I doubt I'll have the bandwidth to do this myself in the near future.

@nbro
Copy link
Author

nbro commented Oct 6, 2020

@AdamGleave Is it possible to use baselines (rather than stable-baselines)? baselines apparently supports TF 2 too (see here). If it's not too complicated to use baselines rather stable-baselines, this may be a viable alternative.

@AdamGleave
Copy link
Member

@AdamGleave Is it possible to use baselines (rather than stable-baselines)? baselines apparently supports TF 2 too (see here). If it's not too complicated to use baselines rather stable-baselines, this may be a viable alternative.

I'm OK with switching to baselines for this project, it would be a fairly minor change to the code. However, I've not had the opportunity to test out their TF2 branch. So would need to do some benchmarking to verify it doesn't introduce any regressions for this project.

@nbro
Copy link
Author

nbro commented Oct 6, 2020

Indeed, it doesn't work with tensorflow==2.3.0. I get the error ModuleNotFoundError: No module named 'tensorflow.contrib' (when trying to execute python -m evaluating_rewards.analysis.dissimilarity_heatmaps.plot_epic_heatmap) because stable-baselines tries to import that.

Is it possible to know if you then plan to make this package use baselines (rather than stable-baselines)? I would like to know if I can wait a few days, weeks, or months for the changes, or if I need to try to do it myself (which would be quite painful, because I am still not familiar with neither baselines or stable-baselines)?

@AdamGleave
Copy link
Member

I'm not planning on switching to baselines, sorry, but would merge a PR that made that change along with other ports to TensorFlow 2.

Right now my priority is on adding some new experiments, and the codebase works OK for me (Python 3.7, Linux, TensorFlow 1.15). I will want to eventually clean it up and make it as usable as possible for a broader audience, but I won't be prioritizing that until the features are frozen.

@AdamGleave
Copy link
Member

A workaround you could try is to use the Docker image which should avoid these dependency issues.

@araffin
Copy link

araffin commented Oct 19, 2020

Related: hill-a/stable-baselines#1012 (comment)

"If you (or others) want to support and maintain a TF2 version, we would be also happy about it. But I have to warn you that it is quite time consuming."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants