philtabor / protorl Goto Github PK
View Code? Open in Web Editor NEWA Torch Based RL Framework for Rapid Prototyping of Research Papers
License: MIT License
A Torch Based RL Framework for Rapid Prototyping of Research Papers
License: MIT License
It seems that the opencv-pycharm 4.8.1.78 have some issues. I changed setup.py to use opencv-python==4.7.0.72 and it fixed the problem.
Traceback (most recent call last):
File "/home/jason/github_projects/ProtoRL/protorl/examples/dqn.py", line 5, in
from protorl.wrappers.common import make_env
File "/home/jason/github_projects/ProtoRL/protorl/wrappers/common.py", line 1, in
import gym
File "/home/jason/github_projects/ProtoRL/venv/lib/python3.10/site-packages/gym/init.py", line 15, in
from gym.envs import make, spec, register
File "/home/jason/github_projects/ProtoRL/venv/lib/python3.10/site-packages/gym/envs/init.py", line 1, in
from gym.envs.registration import load_env_plugins as _load_env_plugins
File "/home/jason/github_projects/ProtoRL/venv/lib/python3.10/site-packages/gym/envs/registration.py", line 24, in
from gym.wrappers import (
File "/home/jason/github_projects/ProtoRL/venv/lib/python3.10/site-packages/gym/wrappers/init.py", line 3, in
from gym.wrappers.atari_preprocessing import AtariPreprocessing
File "/home/jason/github_projects/ProtoRL/venv/lib/python3.10/site-packages/gym/wrappers/atari_preprocessing.py", line 8, in
import cv2
File "/home/jason/github_projects/ProtoRL/venv/lib/python3.10/site-packages/cv2/init.py", line 181, in
bootstrap()
File "/home/jason/github_projects/ProtoRL/venv/lib/python3.10/site-packages/cv2/init.py", line 175, in bootstrap
if __load_extra_py_code_for_module("cv2", submodule, DEBUG):
File "/home/jason/github_projects/ProtoRL/venv/lib/python3.10/site-packages/cv2/init.py", line 28, in __load_extra_py_code_for_module
py_module = importlib.import_module(module_name)
File "/usr/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/home/jason/github_projects/ProtoRL/venv/lib/python3.10/site-packages/cv2/typing/init.py", line 69, in
NumPyArrayGeneric = numpy.ndarray[typing.Any, numpy.dtype[numpy.generic]]
TypeError: 'numpy._DTypeMeta' object is not subscriptable
For some reason I forgot to include prioritization in the dueling agent.
In the ppo_discrete.py file the adapt_actions flag is set to True, when it should be False.
I changed the parameter in examples/dqn.py to this and I get an error:
def main():
env_name = 'CartPole-v1'
# env_name = 'PongNoFrameskip-v4'
use_prioritization = True
use_double = False
use_dueling = True
# use_dueling = False
# use_atari = True
use_atari = False
Traceback (most recent call last):
File "/home/jason/github_projects/ProtoRL/protorl/examples/dqn.py", line 41, in <module>
main()
File "/home/jason/github_projects/ProtoRL/protorl/examples/dqn.py", line 37, in main
scores, steps_array = ep_loop.run(n_games)
File "/home/jason/github_projects/ProtoRL/protorl/loops/single.py", line 34, in run
self.agent.update()
File "/home/jason/github_projects/ProtoRL/protorl/agents/dqn.py", line 46, in update
q_pred = self.q_eval.forward(states)[indices, actions]
TypeError: tuple indices must be integers or slices, not tuple
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.