{"id":20446396,"url":"https://github.com/ray-project/maze-raylit","last_synced_at":"2025-07-02T01:33:20.418Z","repository":{"id":55947967,"uuid":"318274659","full_name":"ray-project/maze-raylit","owner":"ray-project","description":"Hackathon 2020! Max Archit Zhe","archived":false,"fork":false,"pushed_at":"2020-12-07T16:36:53.000Z","size":100076,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-13T00:51:20.013Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ray-project.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null}},"created_at":"2020-12-03T17:47:58.000Z","updated_at":"2022-12-18T19:14:51.000Z","dependencies_parsed_at":"2022-08-15T10:10:28.431Z","dependency_job_id":null,"html_url":"https://github.com/ray-project/maze-raylit","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ray-project/maze-raylit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ray-project%2Fmaze-raylit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ray-project%2Fmaze-raylit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ray-project%2Fmaze-raylit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ray-project%2Fmaze-raylit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ray-project","download_url":"https://codeload.github.com/ray-project/maze-raylit/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ray-project%2Fmaze-raylit/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263060410,"owners_count":23407507,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-15T10:19:54.962Z","updated_at":"2025-07-02T01:33:20.395Z","avatar_url":"https://github.com/ray-project.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"**THIS IS A HACKATHON PROJECT EXPLORING THE INTEGRATION BETWEEN RAY AND STREAMLIT**\n\n.. image:: https://github.com/ray-project/ray/raw/master/doc/source/images/ray_header_logo.png\n\n.. image:: https://readthedocs.org/projects/ray/badge/?version=master\n    :target: http://docs.ray.io/en/master/?badge=master\n\n.. image:: https://img.shields.io/badge/Ray-Join%20Slack-blue\n    :target: https://forms.gle/9TSdDYUgxYs8SA9e8\n\n|\n\n\n**Ray provides a simple, universal API for building 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- `RaySGD \u003chttps://docs.ray.io/en/master/raysgd/raysgd.html\u003e`__: Distributed Training Wrappers\n- `Ray Serve`_: Scalable and Programmable Serving\n\nThere are also many `community integrations \u003chttps://docs.ray.io/en/master/ray-libraries.html\u003e`_ with Ray, including `Dask`_, `MARS`_, `Modin`_, `Horovod`_, `Hugging Face`_, `Scikit-learn`_, and others. Check out the `full list of Ray distributed libraries here \u003chttps://docs.ray.io/en/master/ray-libraries.html\u003e`_.\n\nInstall Ray with: ``pip install ray``. For nightly wheels, see the\n`Installation page \u003chttps://docs.ray.io/en/master/installation.html\u003e`__.\n\n.. _`Modin`: https://github.com/modin-project/modin\n.. _`Hugging Face`: https://huggingface.co/transformers/main_classes/trainer.html#transformers.Trainer.hyperparameter_search\n.. _`MARS`: https://docs.ray.io/en/master/mars-on-ray.html\n.. _`Dask`: https://docs.ray.io/en/master/dask-on-ray.html\n.. _`Horovod`: https://horovod.readthedocs.io/en/stable/ray_include.html\n.. _`Scikit-learn`: joblib.html\n\n\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(object):\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 \u003chttps://github.com/ray-project/ray/blob/master/python/ray/autoscaler/aws/example-full.yaml\u003e`__, and run:\n\n``ray submit [CLUSTER.YAML] example.py --start``\n\nRead more about `launching clusters \u003chttps://docs.ray.io/en/master/cluster/index.html\u003e`_.\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, `PyTorch Lightning \u003chttps://github.com/williamFalcon/pytorch-lightning\u003e`_, TensorFlow, and Keras.\n- Visualize results with `TensorBoard \u003chttps://www.tensorflow.org/get_started/summaries_and_tensorboard\u003e`__.\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 \u003chttp://ax.dev\u003e`_, `HyperOpt \u003chttps://github.com/hyperopt/hyperopt\u003e`_, and `Bayesian Optimization \u003chttps://github.com/fmfn/BayesianOptimization\u003e`_ 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[tune]\"\n\n\nThis example runs a parallel grid search to optimize an example objective function.\n\n.. code-block:: python\n\n\n    from ray import tune\n\n\n    def objective(step, alpha, beta):\n        return (0.1 + alpha * step / 100)**(-1) + beta * 0.1\n\n\n    def training_function(config):\n        # Hyperparameters\n        alpha, beta = config[\"alpha\"], config[\"beta\"]\n        for step in range(10):\n            # Iterative training function - can be any arbitrary training procedure.\n            intermediate_score = objective(step, alpha, beta)\n            # Feed the score back back to Tune.\n            tune.report(mean_loss=intermediate_score)\n\n\n    analysis = tune.run(\n        training_function,\n        config={\n            \"alpha\": tune.grid_search([0.001, 0.01, 0.1]),\n            \"beta\": tune.choice([1, 2, 3])\n        })\n\n    print(\"Best config: \", analysis.get_best_config(metric=\"mean_loss\"))\n\n    # Get a dataframe for analyzing trial results.\n    df = analysis.results_df\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://docs.ray.io/en/master/tune.html\n.. _`Population Based Training (PBT)`: https://docs.ray.io/en/master/tune-schedulers.html#population-based-training-pbt\n.. _`Vizier's Median Stopping Rule`: https://docs.ray.io/en/master/tune-schedulers.html#median-stopping-rule\n.. _`HyperBand/ASHA`: https://docs.ray.io/en/master/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-wide.jpg\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 \u003e 0:\n                self.cur_pos -= 1\n            elif action == 1:\n                self.cur_pos += 1\n            done = self.cur_pos \u003e= 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://docs.ray.io/en/master/rllib.html\n\n\nRay Serve Quick Start\n---------------------\n\n.. image:: https://raw.githubusercontent.com/ray-project/ray/master/doc/source/serve/logo.svg\n  :width: 400\n\n`Ray Serve`_ is a scalable model-serving library built on Ray. It is:\n\n- Framework Agnostic: Use the same toolkit to serve everything from deep\n  learning models built with frameworks like PyTorch or Tensorflow \u0026 Keras\n  to Scikit-Learn models or arbitrary business logic.\n- Python First: Configure your model serving with pure Python code - no more\n  YAMLs or JSON configs.\n- Performance Oriented: Turn on batching, pipelining, and GPU acceleration to\n  increase the throughput of your model.\n- Composition Native: Allow you to create \"model pipelines\" by composing multiple\n  models together to drive a single prediction.\n- Horizontally Scalable: Serve can linearly scale as you add more machines. Enable\n  your ML-powered service to handle growing traffic.\n\nTo run this example, you will need to install the following:\n\n.. code-block:: bash\n\n    $ pip install scikit-learn\n    $ pip install \"ray[serve]\"\n\nThis example runs serves a scikit-learn gradient boosting classifier.\n\n.. code-block:: python\n\n    from ray import serve\n    import pickle\n    import requests\n    from sklearn.datasets import load_iris\n    from sklearn.ensemble import GradientBoostingClassifier\n\n    # Train model\n    iris_dataset = load_iris()\n    model = GradientBoostingClassifier()\n    model.fit(iris_dataset[\"data\"], iris_dataset[\"target\"])\n\n    # Define Ray Serve model,\n    class BoostingModel:\n        def __init__(self):\n            self.model = model\n            self.label_list = iris_dataset[\"target_names\"].tolist()\n\n        def __call__(self, flask_request):\n            payload = flask_request.json[\"vector\"]\n            print(\"Worker: received flask request with data\", payload)\n\n            prediction = self.model.predict([payload])[0]\n            human_name = self.label_list[prediction]\n            return {\"result\": human_name}\n\n\n    # Deploy model\n    client = serve.start()\n    client.create_backend(\"iris:v1\", BoostingModel)\n    client.create_endpoint(\"iris_classifier\", backend=\"iris:v1\", route=\"/iris\")\n\n    # Query it!\n    sample_request_input = {\"vector\": [1.2, 1.0, 1.1, 0.9]}\n    response = requests.get(\"http://localhost:8000/iris\", json=sample_request_input)\n    print(response.text)\n    # Result:\n    # {\n    #  \"result\": \"versicolor\"\n    # }\n\n\n.. _`Ray Serve`: https://docs.ray.io/en/master/serve/index.html\n\nMore Information\n----------------\n\n- `Documentation`_\n- `Tutorial`_\n- `Blog`_\n- `Ray 1.0 Architecture whitepaper`_ **(new)**\n- `Ray Design Patterns`_ **(new)**\n- `RLlib paper`_\n- `Tune paper`_\n\n*Older documents:*\n\n- `Ray paper`_\n- `Ray HotOS paper`_\n- `Blog (old)`_\n\n.. _`Documentation`: http://docs.ray.io/en/master/index.html\n.. _`Tutorial`: https://github.com/ray-project/tutorial\n.. _`Blog (old)`: https://ray-project.github.io/\n.. _`Blog`: https://medium.com/distributed-computing-with-ray\n.. _`Ray 1.0 Architecture whitepaper`: https://docs.google.com/document/d/1lAy0Owi-vPz2jEqBSaHNQcy2IBSDEHyXNOQZlGuj93c/preview\n.. _`Ray Design Patterns`: https://docs.google.com/document/d/167rnnDFIVRhHhK4mznEIemOtj63IOhtIPvSYaPgI4Fg/edit\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- `Community Slack`_: Join our Slack workspace.\n- `GitHub Discussions`_: For discussions about development, questions about usage, and feature requests.\n- `GitHub Issues`_: For reporting bugs.\n- `Twitter`_: Follow updates on Twitter.\n- `Meetup Group`_: Join our meetup group.\n- `StackOverflow`_: For questions about how to use Ray.\n\n.. _`GitHub Discussions`: https://github.com/ray-project/ray/discussions\n.. _`GitHub Issues`: https://github.com/ray-project/ray/issues\n.. _`StackOverflow`: https://stackoverflow.com/questions/tagged/ray\n.. _`Meetup Group`: https://www.meetup.com/Bay-Area-Ray-Meetup/\n.. _`Community Slack`: https://forms.gle/9TSdDYUgxYs8SA9e8\n.. _`Twitter`: https://twitter.com/raydistributed\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fray-project%2Fmaze-raylit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fray-project%2Fmaze-raylit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fray-project%2Fmaze-raylit/lists"}