{ "info": { "author": "takuseno", "author_email": "takuma.seno@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": "[![CircleCI](https://circleci.com/gh/takuseno/mvc-drl.svg?style=svg&circle-token=a53a3796ed3591f9f3bd411807367df4a23483c0)](https://circleci.com/gh/takuseno/mvc-drl)\n[![Maintainability](https://api.codeclimate.com/v1/badges/509948ab7059db56aacd/maintainability)](https://codeclimate.com/github/takuseno/mvc-drl/maintainability)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/509948ab7059db56aacd/test_coverage)](https://codeclimate.com/github/takuseno/mvc-drl/test_coverage)\n[![Job Status](https://inspecode.rocro.com/badges/github.com/takuseno/mvc-drl/status?token=CCr2Hv5DZj1j9jMjT0RZy2VnL24IvObufIUMR9NJtl8)](https://inspecode.rocro.com/jobs/github.com/takuseno/mvc-drl/latest?completed=true)\n[![Report](https://inspecode.rocro.com/badges/github.com/takuseno/mvc-drl/report?token=CCr2Hv5DZj1j9jMjT0RZy2VnL24IvObufIUMR9NJtl8&branch=master)](https://inspecode.rocro.com/reports/github.com/takuseno/mvc-drl/branch/master/summary)\n\n# mvc-drl\nClean deep reinforcement learning codes based on Web MVC architecture with complete unit tests\n\n## motivation\nImplementing deep reinforcement learning algorithms is easy to make up messy codes because interaction loop between an environment and an agent requires a lot of dependencies among classes.\nEven deep learning requires special skills to build clean codes.\n\nTo think out of the box, Web engineers spent years on studying MVC (model-view-controller) architecture to build systems with tidy codes to handle interaction between Web and users.\nHere, I found that this MVC architecture is very useful insight even for deep reinforcement learning implementation.\nMVC provides a direction to an architecture with less dependencies, which would be nicer for unit testing.\n\n## installation\n### nvidia-docker\nYou can use docker to setup and run experiments.\n```\n$ ./scripts/build.sh\n```\n\nOnce you built the container, you can start a container with nvidia runtime via `./scripts/up.sh`.\n```\n$ ./scripts/up.sh\nroot@a84ab59aa668:/home/app# ls\nDockerfile README.md example.confing.json graphs mvc scripts tests\nLICENSE examples logs requirements.txt test.sh tools\nroot@a84ab59aa668:/home/app#\n```\n\n### manual\nYou need to install packages written in `requirements.txt` and tensorflow.\n```\n$ pip install -r requirements.txt\n$ pip install tensorflow-gpu tensorflow-probability-gpu\n# if you run example scripts\n$ pip install pybullet roboschool\n```\nIf you have a problem of installing tensorflow probability, check tensorflow version.\n\n\n### install as a library\nThis repository is also available on PyPI.\nYou can implement extra algorithms built on top of mvc-drl.\n```\n$ pip install mvc\n```\n:warning: This reposiotry is under development so that interfaces might be frequently changed.\n\n\n## algorithms\nFor academic usage, we provide baseline implementations that you might need to compare.\n\n- [x] Proximal Policy Optimization\n- [x] Deep Deterministic Policy Gradients\n- [x] Soft Actor-Critic\n\n## Ant performance\nEach point represents an average evaluation reward of 10 episodes.\nPretty much same performance has been achieved as a paper of [Soft Actor-Critic](https://arxiv.org/abs/1801.01290).\n\n### PPO\n```sh\n$ python -m examples.ppo --env Ant-v2\n```\n\n![ppo](graphs/ppo_ant.png)\n\n### DDPG\n```sh\n$ python -m examples.ddpg --env Ant-v2\n```\n\n![ddpg](graphs/ddpg_ant.png)\n\n### SAC\n```sh\n$ python -m examples.sac --env Ant-v2 --reward-scale 5\n```\n\n![sac](graphs/sac_ant.png)\n\n### comparison\n![comparison](graphs/ant_compare.png)\n\n## log visualization\nAll logging data is saved under `logs` directory as csv files and visualization tool data.\nUse `--log-adapter` option in example codes to switch tensorboard and visdom as visualization (default: tensorboard).\n\n### tensorboard\n```\n$ tensorboard --logdir logs\n```\n\n### visdom\nTo use visdom, you need to fill host information of a visdom server.\n```\n$ mv example.config.json config.json\n$ vim config.json # fill visdom section\n```\n\nBefore running experiments, start the visdom server.\n```\n$ visdom\n```\n\n### matplotlib\nYou can visualize with `tools/plot_csv.py` by directly pointing to csv files.\n```\n$ python tools/plot_csv.py ...\n```\nBy default, legends are set with paths of files.\nIf you want to set them manually, use `label` option.\n```\n$ python tools/plot_csv.py --label=experiment1 --label=experiment2 \n```\n\n## unit testing\nTo gurantee code quality, all functions and classes including neural networks must have unit tests.\n\nFollowing command runs all unit tests under `tests` directory.\n```sh\n$ ./test.sh\n```\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/takuseno/mvc-drl", "keywords": "deep reinforcemtne learning,tensorflow", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "mvc", "package_url": "https://pypi.org/project/mvc/", "platform": "", "project_url": "https://pypi.org/project/mvc/", "project_urls": { "Homepage": "https://github.com/takuseno/mvc-drl" }, "release_url": "https://pypi.org/project/mvc/1.1.2/", "requires_dist": [ "pytest (==3.8.1)", "comet-ml (==1.0.44)", "visdom (==0.1.8.6)", "seaborn (==0.9.0)", "matplotlib (==2.0.2)", "pylint (==2.2.2)", "pycodestyle (==2.4.0)", "gym (==0.11.0)", "coverage (==4.5.2)" ], "requires_python": ">=3.5", "summary": "Cleanest Deep Reinforcement Learning Implementation Based on Web MVC", "version": "1.1.2" }, "last_serial": 5187725, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "441d094fa64f803d3f543cd0a66d250f", "sha256": "647edfea42b4723458212b32aa5106c46cd04b3442952d2a421ce85738c2f053" }, "downloads": -1, "filename": "mvc-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "441d094fa64f803d3f543cd0a66d250f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 38225, "upload_time": "2019-02-13T03:09:33", "url": "https://files.pythonhosted.org/packages/16/2d/e8c413dd1623567d958b1815ab4d32b471825dc91f2a7dd8cee168990f36/mvc-1.0.0-py3-none-any.whl" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "c3b0feeb10d316b06c86eabd2d519ee6", "sha256": "58b5042fe20cc0c14e2b38a9ca2b84813e03a7fd066ffc841c29fb94cf1bcef2" }, "downloads": -1, "filename": "mvc-1.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "c3b0feeb10d316b06c86eabd2d519ee6", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 40057, "upload_time": "2019-02-14T07:27:22", "url": "https://files.pythonhosted.org/packages/80/58/3d9a08f863f33b62d88bd804ecb3c2dc30194c30669f3aee9ac306a59f46/mvc-1.1.0-py3-none-any.whl" } ], "1.1.1": [ { "comment_text": "", "digests": { "md5": "3d0304f6f762fa69d6bf11db0ba25019", "sha256": "fbb8e601c078cf7b12f9e778d59131e3b1a1bf20e77076ad9c52429a8a6aee66" }, "downloads": -1, "filename": "mvc-1.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "3d0304f6f762fa69d6bf11db0ba25019", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 41291, "upload_time": "2019-03-08T02:22:10", "url": "https://files.pythonhosted.org/packages/dd/a9/ec2403f3c87053484428873d4e349afa72322bedeb032a73c98d57cf9161/mvc-1.1.1-py3-none-any.whl" } ], "1.1.2": [ { "comment_text": "", "digests": { "md5": "eceb66b2c7043587aeae6a6602d817ab", "sha256": "78d8adcb16926761ff30fd7c02b83ac7fc48d04b584ccff271724e7af91fdc83" }, "downloads": -1, "filename": "mvc-1.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "eceb66b2c7043587aeae6a6602d817ab", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 41346, "upload_time": "2019-04-25T12:32:10", "url": "https://files.pythonhosted.org/packages/1f/42/082756920c67c20d248c72f655b7f30c02f03f2bc36c053929be35d577d2/mvc-1.1.2-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "eceb66b2c7043587aeae6a6602d817ab", "sha256": "78d8adcb16926761ff30fd7c02b83ac7fc48d04b584ccff271724e7af91fdc83" }, "downloads": -1, "filename": "mvc-1.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "eceb66b2c7043587aeae6a6602d817ab", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 41346, "upload_time": "2019-04-25T12:32:10", "url": "https://files.pythonhosted.org/packages/1f/42/082756920c67c20d248c72f655b7f30c02f03f2bc36c053929be35d577d2/mvc-1.1.2-py3-none-any.whl" } ] }