{ "info": { "author": "Fangyu Wu", "author_email": "fywu85@gmail.com", "bugtrack_url": null, "classifiers": [], "description": ".. image:: https://github.com/ray-project/ray/raw/master/doc/source/images/ray_header_logo.png\n\n.. image:: https://travis-ci.com/ray-project/ray.svg?branch=master\n :target: https://travis-ci.com/ray-project/ray\n\n.. image:: https://readthedocs.org/projects/ray/badge/?version=latest\n :target: http://ray.readthedocs.io/en/latest/?badge=latest\n\n.. image:: https://img.shields.io/badge/pypi-0.7.1-blue.svg\n :target: https://pypi.org/project/ray/\n\n|\n\n\n**Ray is a fast and simple framework for building and running distributed applications.**\n\nRay is packaged with the following libraries for accelerating machine learning workloads:\n\n- `Tune`_: Scalable Hyperparameter Tuning\n- `RLlib`_: Scalable Reinforcement Learning\n- `Distributed Training `__\n\nInstall Ray with: ``pip install ray``. For nightly wheels, see the `Installation page `__.\n\nQuick Start\n-----------\n\nExecute Python functions in parallel.\n\n.. code-block:: python\n\n import ray\n ray.init()\n\n @ray.remote\n def f(x):\n return x * x\n\n futures = [f.remote(i) for i in range(4)]\n print(ray.get(futures))\n\nTo use Ray's actor model:\n\n.. code-block:: python\n\n\n import ray\n ray.init()\n\n @ray.remote\n class Counter():\n def __init__(self):\n self.n = 0\n\n def increment(self):\n self.n += 1\n\n def read(self):\n return self.n\n\n counters = [Counter.remote() for i in range(4)]\n [c.increment.remote() for c in counters]\n futures = [c.read.remote() for c in counters]\n print(ray.get(futures))\n\n\nRay programs can run on a single machine, and can also seamlessly scale to large clusters. To execute the above Ray script in the cloud, just download `this configuration file `__, and run:\n\n``ray submit [CLUSTER.YAML] example.py --start``\n\nRead more about `launching clusters `_.\n\nTune Quick Start\n----------------\n\n.. image:: https://github.com/ray-project/ray/raw/master/doc/source/images/tune-wide.png\n\n`Tune`_ is a library for hyperparameter tuning at any scale.\n\n- Launch a multi-node distributed hyperparameter sweep in less than 10 lines of code.\n- Supports any deep learning framework, including PyTorch, TensorFlow, and Keras.\n- Visualize results with `TensorBoard `__.\n- Choose among scalable SOTA algorithms such as `Population Based Training (PBT)`_, `Vizier's Median Stopping Rule`_, `HyperBand/ASHA`_.\n- Tune integrates with many optimization libraries such as `Facebook Ax `_, `HyperOpt `_, and `Bayesian Optimization `_ and enables you to scale them transparently.\n\nTo run this example, you will need to install the following:\n\n.. code-block:: bash\n\n $ pip install ray torch torchvision filelock\n\n\nThis example runs a parallel grid search to train a Convolutional Neural Network using PyTorch.\n\n.. code-block:: python\n\n\n import torch.optim as optim\n from ray import tune\n from ray.tune.examples.mnist_pytorch import (\n get_data_loaders, ConvNet, train, test)\n\n\n def train_mnist(config):\n train_loader, test_loader = get_data_loaders()\n model = ConvNet()\n optimizer = optim.SGD(model.parameters(), lr=config[\"lr\"])\n for i in range(10):\n train(model, optimizer, train_loader)\n acc = test(model, test_loader)\n tune.track.log(mean_accuracy=acc)\n\n\n analysis = tune.run(\n train_mnist, config={\"lr\": tune.grid_search([0.001, 0.01, 0.1])})\n\n print(\"Best config: \", analysis.get_best_config(metric=\"mean_accuracy\"))\n\n # Get a dataframe for analyzing trial results.\n df = analysis.dataframe()\n\nIf TensorBoard is installed, automatically visualize all trial results:\n\n.. code-block:: bash\n\n tensorboard --logdir ~/ray_results\n\n.. _`Tune`: https://ray.readthedocs.io/en/latest/tune.html\n.. _`Population Based Training (PBT)`: https://ray.readthedocs.io/en/latest/tune-schedulers.html#population-based-training-pbt\n.. _`Vizier's Median Stopping Rule`: https://ray.readthedocs.io/en/latest/tune-schedulers.html#median-stopping-rule\n.. _`HyperBand/ASHA`: https://ray.readthedocs.io/en/latest/tune-schedulers.html#asynchronous-hyperband\n\nRLlib Quick Start\n-----------------\n\n.. image:: https://github.com/ray-project/ray/raw/master/doc/source/images/rllib-stack.png\n\n`RLlib`_ is an open-source library for reinforcement learning built on top of Ray that offers both high scalability and a unified API for a variety of applications.\n\n.. code-block:: bash\n\n pip install tensorflow # or tensorflow-gpu\n pip install ray[rllib] # also recommended: ray[debug]\n\n.. code-block:: python\n\n import gym\n from gym.spaces import Discrete, Box\n from ray import tune\n\n class SimpleCorridor(gym.Env):\n def __init__(self, config):\n self.end_pos = config[\"corridor_length\"]\n self.cur_pos = 0\n self.action_space = Discrete(2)\n self.observation_space = Box(0.0, self.end_pos, shape=(1, ))\n\n def reset(self):\n self.cur_pos = 0\n return [self.cur_pos]\n\n def step(self, action):\n if action == 0 and self.cur_pos > 0:\n self.cur_pos -= 1\n elif action == 1:\n self.cur_pos += 1\n done = self.cur_pos >= self.end_pos\n return [self.cur_pos], 1 if done else 0, done, {}\n\n tune.run(\n \"PPO\",\n config={\n \"env\": SimpleCorridor,\n \"num_workers\": 4,\n \"env_config\": {\"corridor_length\": 5}})\n\n.. _`RLlib`: https://ray.readthedocs.io/en/latest/rllib.html\n\n\nMore Information\n----------------\n\n- `Documentation`_\n- `Tutorial`_\n- `Blog`_\n- `Ray paper`_\n- `Ray HotOS paper`_\n- `RLlib paper`_\n- `Tune paper`_\n\n.. _`Documentation`: http://ray.readthedocs.io/en/latest/index.html\n.. _`Tutorial`: https://github.com/ray-project/tutorial\n.. _`Blog`: https://ray-project.github.io/\n.. _`Ray paper`: https://arxiv.org/abs/1712.05889\n.. _`Ray HotOS paper`: https://arxiv.org/abs/1703.03924\n.. _`RLlib paper`: https://arxiv.org/abs/1712.09381\n.. _`Tune paper`: https://arxiv.org/abs/1807.05118\n\nGetting Involved\n----------------\n\n- `ray-dev@googlegroups.com`_: For discussions about development or any general\n questions.\n- `StackOverflow`_: For questions about how to use Ray.\n- `GitHub Issues`_: For reporting bugs and feature requests.\n- `Pull Requests`_: For submitting code contributions.\n\n.. _`ray-dev@googlegroups.com`: https://groups.google.com/forum/#!forum/ray-dev\n.. _`GitHub Issues`: https://github.com/ray-project/ray/issues\n.. _`StackOverflow`: https://stackoverflow.com/questions/tagged/ray\n.. _`Pull Requests`: https://github.com/ray-project/ray/pulls", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ray-project/ray", "keywords": "ray distributed parallel machine-learning reinforcement-learning deep-learning python", "license": "Apache 2.0", "maintainer": "", "maintainer_email": "", "name": "fangyu-pypitest", "package_url": "https://pypi.org/project/fangyu-pypitest/", "platform": "", "project_url": "https://pypi.org/project/fangyu-pypitest/", "project_urls": { "Homepage": "https://github.com/ray-project/ray" }, "release_url": "https://pypi.org/project/fangyu-pypitest/0.8.0.dev4/", "requires_dist": null, "requires_python": "", "summary": "A system for parallel and distributed Python that unifies the ML ecosystem.", "version": "0.8.0.dev4" }, "last_serial": 5789166, "releases": { "0.8.0.dev4": [ { "comment_text": "", "digests": { "md5": "cdbb22803595d04f1b7e51159e1686cf", "sha256": "e02d907d8453ad759e3ce1cdadcb38b8e8ec11e76d6c7cfeaa719d86e47002c2" }, "downloads": -1, "filename": "fangyu-pypitest-0.8.0.dev4.tar.gz", "has_sig": false, "md5_digest": "cdbb22803595d04f1b7e51159e1686cf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 673563, "upload_time": "2019-09-06T01:20:48", "url": "https://files.pythonhosted.org/packages/54/2a/87d7e82e94d99d5f7639c7586e869064b8bafd72107d397778f1c9f7440b/fangyu-pypitest-0.8.0.dev4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "cdbb22803595d04f1b7e51159e1686cf", "sha256": "e02d907d8453ad759e3ce1cdadcb38b8e8ec11e76d6c7cfeaa719d86e47002c2" }, "downloads": -1, "filename": "fangyu-pypitest-0.8.0.dev4.tar.gz", "has_sig": false, "md5_digest": "cdbb22803595d04f1b7e51159e1686cf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 673563, "upload_time": "2019-09-06T01:20:48", "url": "https://files.pythonhosted.org/packages/54/2a/87d7e82e94d99d5f7639c7586e869064b8bafd72107d397778f1c9f7440b/fangyu-pypitest-0.8.0.dev4.tar.gz" } ] }