Giter Site home page Giter Site logo

q2's Introduction

q2

A reinforcement learning framework and command line tool.

Get it

pip install q2
q2 --help

Use it

Make a folder, cd to it, then run

q2 init

to generate a new reinforcement learning project.

Docs

Documentation is available at https://q2.readthedocs.io/.

Develop

  1. You'll need Python >= 3.5 (this is because q2 makes use of type annotations)
  2. Clone this repository
  3. I recommend setting up a virtual env in which to develop: python -m venv env
  4. pip install -r requirements.txt

To test out the command line tools from your working copy of q2, run

pip install -e .

then run

q2 --help

to test that it worked.

Contributing

If you want to submit a bug fix or minor change, feel free to make a pull request.

If you want to discuss bigger improvements, send an email to tdbalcorn at gmail dot com.

q2's People

Contributors

tdb-alcorn avatar dependabot[bot] avatar

Stargazers

Wojtek avatar David James avatar Guillermo Carrasco avatar

Watchers

James Cloos avatar

q2's Issues

AttributeError: 'Namespace' object has no attribute 'out_filename'

Hi,

Trying to reproduce the cart pole training scenario described in here, I encountered the following error:

(python3)  ~/repos_and_code/reinforced_test ~> q2 train random --env gym.CartPole-v1 --episodes 10 --render
Traceback (most recent call last):
  File "/home/guillermo/.anaconda/envs/python3/bin/q2", line 11, in <module>
    sys.exit(main())
  File "/home/guillermo/.anaconda/envs/python3/lib/python3.6/site-packages/q2/tool.py", line 83, in main
    args.func(args)
  File "/home/guillermo/.anaconda/envs/python3/lib/python3.6/site-packages/q2/train/__init__.py", line 90, in main
    regimen.train(env_maker, state, args.num_epochs, args.episodes_per_epoch, test=args.test, render=args.render, bk2dir=args.bk2dir, out_filename=args.out_filename)
AttributeError: 'Namespace' object has no attribute 'out_filename'

Looking at the code, seems like the CLI argument out_filename is not defined anywhere.

More info:

Python version: Python 3.6.5 :: Anaconda, Inc.

Reproduce: Just follow the steps described here on a clean python environment.

Running random agent from tutorial is broken

╰─$ q2 train random --env gym.CartPole-v1 --episodes 10 --render                               2 ↵
Traceback (most recent call last):
  File "/Users/tom/dev/team-halite/env/bin/q2", line 8, in <module>
    sys.exit(main())
  File "/Users/tom/dev/team-halite/env/lib/python3.6/site-packages/q2/tool.py", line 83, in main
    args.func(args)
  File "/Users/tom/dev/team-halite/env/lib/python3.6/site-packages/q2/train/__init__.py", line 38, in main
    from q2.agents import all_agents
  File "/Users/tom/dev/team-halite/env/lib/python3.6/site-packages/q2/agents/__init__.py", line 9, in <module>
    from .agent import Agent
  File "/Users/tom/dev/team-halite/env/lib/python3.6/site-packages/q2/agents/agent.py", line 7, in <module>
    class Agent(ABC):
  File "/Users/tom/dev/team-halite/env/lib/python3.6/site-packages/q2/agents/agent.py", line 21, in Agent
    sess:tf.Session,
AttributeError: module 'tensorflow' has no attribute 'Session'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.