Comments (12)
We need to improve the developer docs in general and provide instructions that enable an installation of an environment that supports the full range of tasks.
For instance, in order to be able to install a Python env that supports Atari, one may need to install system-level depenendencies cmake and zlib1g prior to the Poetry install (on Ubuntu, apt-get install cmake zlib1g-dev
).
Afterwards, I had to run pip install gymnasium[atari]
and, for the game ROMs to be pullable, I had to run pip install gymnasium[accept-rom-license]
. The poetry extra atari
is not sufficient, unfortunately.
from tianshou.
Please use source code installation, i.e. pip install -e .
We did a major refactor few months ago, and didn’t update the pypi wheel. cc @MischaPanch
from tianshou.
FYI: Release of the wheel in next version is planned for late January or early February
from tianshou.
If you clone the repo, the surest say to install is with poetry, e.g. using poetry install
from tianshou.
My system is:
- macOS 13.6.3
- Python
>>> import sys >>> print(sys.version, sys.platform) 3.11.7 (main, Dec 27 2023, 17:48:28) [Clang 15.0.0 (clang-1500.1.0.2.5)] darwin
-
I tried running the same demo from above, after having installed the dependencies with poetry like so:
poetry install --all-extras --with dev
(without the extras,opencv-python
andatari-py
are not being installed). -
For running this demo, I had to additionally install manually
pip install gymnasium[atari]
andpip install gymnasium[accept-rom-license]
. I also had to manually installpip install cmake
-
envpool
fails to install:ERROR: Could not find a version that satisfies the requirement envpool (from versions: none) ERROR: No matching distribution found for envpool
- This seems to be an issue with envpool reported also on its Issues board here.
-
After all this, when running
python atari/atari_rainbow.py
the program seems to be stuck because I get intermittently the message that ALE is loadedA.L.E: Arcade Learning Environment (version 0.8.1+53f58b7) [Powered by Stella]
from tianshou.
Thank you a lot for going through the installation and looking into this! I will check the atari example in particular and address the installation details, such that everything is installed at once with the extras.
Could you please also try mujoco or one of the other environments? Atari is a particularly complicated one, the problems might be due to gymnasium (on mac) and not due to tianshou
from tianshou.
Yes. I'll try it on a different environment.
Regarding envpool
issue, meanwhile I found out that it does not work because there is no support for Mac currently (here and [Feature Request] Py3.10, Windows and MacOS support).
from tianshou.
It should be configured properly as if it doesn't find a successful envpool import, it would fall back to gymnasium implementation in tianshou's atari example.
from tianshou.
I was able to run on macOS the example under box2d/acrobot_dualdqn.py
.
I tried also to run mujoco/mujoco_sac.py
, but so far no luck on macOS Ventura. It seems that gcc@9 doesn't compile on macOS versions higher than Monterey:
$ brew install gcc@9
...
gcc@9: This formula either does not compile or function as expected on macOS
versions newer than Monterey due to an upstream incompatibility.
Error: gcc@9: An unsatisfied requirement failed this build.
from tianshou.
On a Ubuntu-based machine I was more successful.
OS
Distributor ID: Ubuntu
Description: Ubuntu 20.04.6 LTS
Release: 20.04
Codename: focal
Python
>>> import sys
>>> print(sys.version, sys.platform)
3.11.7 (main, Dec 29 2023, 19:47:35) [GCC 9.4.0] linux
I successfully ran box2d/acrobot_dualdqn.py
, python atari_dqn.py --task "PongNoFrameskip-v4"
, python mujoco_sac.py
.
After having followed the steps in the Contributions section, I had to additionally do:
poetry install --all-extras
apt-get update && apt-get install -y python3-opencv
from tianshou.
As I suspected, the problem lies mainly in gymnasium and not in tianshou. I'll extend the readme and the pyproject to better deal with macos. Weirdly, the tests in CI on macos run through without envpool problems. Maybe we should extend them as well
from tianshou.
Checking in on the macOS related issues
from tianshou.
Related Issues (20)
- Change log is chaotic and partly uninformative HOT 2
- how to run RL using multi-nodes in cluster HOT 1
- Potential confusion about where start timesteps are collected in HL interfaces HOT 4
- Use Altair inside a notebook to display benchmark results
- Does Tianshou truly supports MARL out of the box? HOT 1
- Extend benchmark with mujoco v4 envs
- How can I make action sampling within the range specified by my environment when using onpolicy_trainer? HOT 6
- Document effects of the relations between buffer size, num workers and episode length
- Poetry update the torch versioned from cuda (2.0.1+cu118) to cpu (2.1.1) defaultly on Windows HOT 9
- [question] Why does Tianshou use a replay buffer in on-policy RL algorithms? HOT 1
- ImportError: cannot import name 'Self' from 'typing' (/root/miniconda3/lib/python3.10/typing.py) HOT 1
- ModuleNotFoundError: No module named 'tianshou.highlevel' HOT 2
- Support dict observation spaces in highlevel api
- get_env_attr not working in SubprocVectorEnv? HOT 2
- How to save the log which axis is each epoch not epoch's steps? HOT 2
- Python Bug: lambda function refers only one environment HOT 4
- expected to be in range of [-1, 0], but got 1 HOT 3
- Unable to replicate original PPO performance HOT 7
- Clarification Needed on Implementing Action Masking in DQN with preprocess_fn in Collector
- will add dreamerv3 ?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tianshou.