Coder Social home page Coder Social logo

ibm / vsrl-framework Goto Github PK

View Code? Open in Web Editor NEW
53.0 10.0 13.0 1.97 MB

The Verifiably Safe Reinforcement Learning Framework

License: MIT License

Shell 0.17% Python 99.83%
reinforcement-learning safety-critical formal-verification formal-methods reinforcement-learning-algorithms reinforcement-learning-environments cyber-physical-systems keymaerax keymaera differential-dynamic-logic

vsrl-framework's Issues

Script for VSRL Agents not working

I am trying to use the framework, but unfortunately the provided scripts do not work. I'm not sure if this is an issue on my end, or if it may be because of unspecified dependency versions. I would be really happy for some help.

Expected Behavior

Running the scripts/train_rl.py should work. The error I get is the following.

image

Possible Solution

Add a requirements.txt file

Steps to Reproduce

As stated in the README.

python scripts/train_rl.py --env_name ACC --pbar true

P.S. it is required to specify the pbar parameter as true/false. The README does not state that.

Context (Environment)

Branch - master
Commit hash - 93d85dd
Environment - macOS

Package Versions
  • absl-py==0.11.0
  • attrs==20.2.0
  • auto-argparse==0.0.7
  • cachetools==4.1.1
  • certifi==2020.6.20
  • chardet==3.0.4
  • cloudpickle==1.6.0
  • comet-ml==3.2.5
  • configobj==5.0.6
  • cycler==0.10.0
  • dataclasses==0.6
  • dulwich==0.20.6
  • everett==1.0.3
  • fsspec==0.8.4
  • future==0.18.2
  • google-auth==1.22.1
  • google-auth-oauthlib==0.4.1
  • grpcio==1.33.1
  • gym==0.17.3
  • idna==2.10
  • jsonschema==3.2.0
  • kiwisolver==1.3.0
  • Markdown==3.3.3
  • matplotlib==3.3.2
  • netifaces==0.10.9
  • numpy==1.19.2
  • nvidia-ml-py3==7.352.0
  • oauthlib==3.1.0
  • opencv-python==4.4.0.44
  • parsimonious==0.8.1
  • Pillow==8.0.1
  • portion==2.1.3
  • protobuf==3.13.0
  • psutil==5.7.3
  • pyasn1==0.4.8
  • pyasn1-modules==0.2.8
  • pyglet==1.5.0
  • pyparsing==2.4.7
  • pyrsistent==0.17.3
  • python-dateutil==2.8.1
  • pytorch-lightning==1.0.4
  • PyYAML==5.3.1
  • requests==2.24.0
  • requests-oauthlib==1.3.0
  • rlpyt @ git+https://github.com/astooke/rlpyt.git@f04f23db1eb7b5915d88401fca67869968a07a37
  • rsa==4.6
  • scipy==1.5.3
  • six==1.15.0
  • sortedcontainers==2.2.2
  • tensorboard==2.3.0
  • tensorboard-plugin-wit==1.7.0
  • toml==0.10.1
  • torch==1.7.0
  • torchvision==0.8.1
  • tqdm==4.51.0
  • typing-extensions==3.7.4.3
  • urllib3==1.25.11
  • websocket-client==0.57.0
  • Werkzeug==1.0.1
  • wrapt==1.12.1
  • wurlitzer==2.0.1

Setup.py fails to install and missing dependencies

System Information

  • Python 3.7.5
  • Linux (debian)
  • 5.4.0-64-generic

Describe the current behavior
Running python setup.py install in a virtual environment fails to install. This is due to errors about install pyrl and version problems with pillow and chardet. After fixing the aforementioned issues, tests fail because of missing pytest dependency.

Describe the expected behavior
Creating a virtual environment and running python setup.py install should work out of the box with no errors. Tests should also work without getting an issue about missing dependency.

Standalone code to reproduce the issue

virtualenv --clear --python=python3.7 venv
source venv/bin/activate
python setup.py install

Below is my fix for the setup.py

from distutils.core import setup

from setuptools import find_packages

opencv_pkg = ""
if "DISPLAY" not in os.environ.keys():
    opencv_pkg = "opencv-python-headless"
else:
    opencv_pkg = "opencv-python"

setup(
    name="vsrl",
    version="0.0.1",
    description="Visceral: A Framework for Verifiably Safe Reinforcement Learning",
    author="IBM Research",
    author_email="[email protected]",
    url="https://visceral.safelearning.ai",
    packages=find_packages(),
    install_requires=[
        "scipy",
        "numpy",
        "torch",
        "pillow==7.2.0",
        "chardet==3.0.4",
        opencv_pkg,
        "pytorch_lightning",
        "comet_ml",
        "psutil",
        "torchvision",
        "parsimonious",
        "matplotlib",
        "portion",
        "toml",
        "auto-argparse",
        "gym",
        "pytest",
    ],
    extras_require={"dev": ["pytest", "pytest-cov"]},
    dependency_links=["http://github.com/astooke/rlpyt/tarball/master"]
)

Add tests for examples

We should have tests covering the following:

  • All RL libraries that we claim to support
  • All of the environments that ship with VSRL
  • All of the examples described in the README, and in any additional future documentation.

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.