diff --git a/docs/doc-requirements.txt b/docs/doc-requirements.txt index 71dc8e9..588edf2 100644 --- a/docs/doc-requirements.txt +++ b/docs/doc-requirements.txt @@ -2,6 +2,10 @@ cloudpickle pickle5==0.0.11; python_version < '3.8' protobuf>=3.9.2,<3.20 +rayfed-nightly +myst-parser==0.18.1 +nbsphinx==0.8.9 +sphinx==5.3.0 # The following dependencies are required for doc-building only. jinja2<3.1.0 diff --git a/docs/source/advanced_topic/architecture.md b/docs/source/advanced_topic/architecture.md new file mode 100644 index 0000000..306e027 --- /dev/null +++ b/docs/source/advanced_topic/architecture.md @@ -0,0 +1,3 @@ +# The Architecture of RayFed + +TBD \ No newline at end of file diff --git a/docs/source/advanced_topic/index.rst b/docs/source/advanced_topic/index.rst new file mode 100644 index 0000000..7cf5e60 --- /dev/null +++ b/docs/source/advanced_topic/index.rst @@ -0,0 +1,15 @@ +.. _advanced_topic: + + +Advanced Topic +================= + +The architecture of RayFed is illustrated in the `architecture `_ . +For a deeper understanding of the principles behind RayFed, refer to the `principle `_ . + + +.. toctree:: + :maxdepth: 1 + + architecture + principle \ No newline at end of file diff --git a/docs/source/advanced_topic/principle.md b/docs/source/advanced_topic/principle.md new file mode 100644 index 0000000..a3690e3 --- /dev/null +++ b/docs/source/advanced_topic/principle.md @@ -0,0 +1,3 @@ +# The Principle of RayFed + +TBD \ No newline at end of file diff --git a/docs/source/conf.py b/docs/source/conf.py index 219db02..b0846eb 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -19,6 +19,8 @@ 'sphinx.ext.intersphinx', 'sphinx.ext.viewcode', 'sphinx.ext.extlinks', + 'myst_parser', + 'nbsphinx', ] intersphinx_mapping = { diff --git a/docs/source/getting_started/index.rst b/docs/source/getting_started/index.rst new file mode 100644 index 0000000..8e8e59a --- /dev/null +++ b/docs/source/getting_started/index.rst @@ -0,0 +1,15 @@ +.. _getting_started: + + +Getting Started +================= + +Please follow the `installation `_ to get RayFed ready. + +Then, we encourage you to check `quick_start `_ and :ref:`tutorials` to play with RayFed. + +.. toctree:: + :maxdepth: 1 + + installation + quick_start \ No newline at end of file diff --git a/docs/source/getting_started/installation.md b/docs/source/getting_started/installation.md new file mode 100644 index 0000000..195d8ad --- /dev/null +++ b/docs/source/getting_started/installation.md @@ -0,0 +1,12 @@ +# Installation + +Install it from pypi. + +```shell +pip install -U rayfed +``` + +Install the nightly released version from pypi. + +```shell +pip install -U rayfed-nightly diff --git a/docs/source/getting_started/quick_start.md b/docs/source/getting_started/quick_start.md new file mode 100644 index 0000000..5acfe8e --- /dev/null +++ b/docs/source/getting_started/quick_start.md @@ -0,0 +1,7 @@ +# Quick Start + +TBD + +## More Examples + +Check out [tutorials](../tutorials/index.rst) to get more examples. \ No newline at end of file diff --git a/docs/source/index.rst b/docs/source/index.rst index 59822d6..cdd82ed 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -1,6 +1,16 @@ Welcome to RayFed documentation! =================================== +.. toctree:: + :maxdepth: 2 + :titlesonly: + :hidden: + + getting_started/index + tutorials/index + api + advanced_topic/index + **RayFed** is a multiple parties joint, distributed execution engine based on Ray, to help build your own federated learning frameworks **in minutes**. @@ -12,17 +22,38 @@ RayFed has the following highlight features: 3. Very Restricted and Clear Data Perimeters 4. Very Large Scale Federated Computing and Training -Check out the :doc:`usage` section for further information, including -how to :ref:`installation` the project. +Check out the :ref:`getting_started` section for further information, including +how to install the project. .. note:: This project is under active development. -Contents --------- +Why RayFed +============== +TBD -.. toctree:: +Getting Started +================= + +Please check :ref:`getting_started` for installation and a quick start guide. + + +Tutorials +============== +- :doc:`tutorials/federated_learning_demo` +- :doc:`tutorials/split_learning_demo` +- :doc:`tutorials/transition_from_ray_to_rayfed` + + +API +============== +Check out `api `_ to write your own RayFed programs. + + +Architecture and principle of RayFed +====================================== + +To gain a comprehensive understanding of RayFed's architecture and principles, +we highly recommend reading :ref:`advanced_topic` - usage - api diff --git a/docs/source/tutorials/federated_learning_demo.ipynb b/docs/source/tutorials/federated_learning_demo.ipynb new file mode 100644 index 0000000..6ead86e --- /dev/null +++ b/docs/source/tutorials/federated_learning_demo.ipynb @@ -0,0 +1,18 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Federated Learning on RayFed" + ] + } + ], + "metadata": { + "language_info": { + "name": "python" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/docs/source/tutorials/index.rst b/docs/source/tutorials/index.rst new file mode 100644 index 0000000..aa97271 --- /dev/null +++ b/docs/source/tutorials/index.rst @@ -0,0 +1,13 @@ +.. _tutorials: + +Tutorials +=============== + +We hope you enjoy these tutorials from RayFed developers. + +.. toctree:: + :maxdepth: 1 + + federated_learning_demo + split_learning_demo + transition_from_ray_to_rayfed \ No newline at end of file diff --git a/docs/source/tutorials/split_learning_demo.ipynb b/docs/source/tutorials/split_learning_demo.ipynb new file mode 100644 index 0000000..532154f --- /dev/null +++ b/docs/source/tutorials/split_learning_demo.ipynb @@ -0,0 +1,18 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Split Learning on RayFed" + ] + } + ], + "metadata": { + "language_info": { + "name": "python" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/docs/source/tutorials/transition_from_ray_to_rayfed.ipynb b/docs/source/tutorials/transition_from_ray_to_rayfed.ipynb new file mode 100644 index 0000000..e742330 --- /dev/null +++ b/docs/source/tutorials/transition_from_ray_to_rayfed.ipynb @@ -0,0 +1,18 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Seamless Federated, Transitioning from Ray to RayFed." + ] + } + ], + "metadata": { + "language_info": { + "name": "python" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/docs/source/usage.rst b/docs/source/usage.rst deleted file mode 100644 index 95d8546..0000000 --- a/docs/source/usage.rst +++ /dev/null @@ -1,27 +0,0 @@ -Usage -===== - -.. _installation: - -Installation ------------- - -To use RayFed, first install it using pip: - -.. code-block:: console - - (.venv) $ pip install -U rayfed - -Starting RayFed ---------------- - -To start a RayFed application, you can use :py:meth:`fed.init` function: - -For example: - ->>> import ray ->>> import fed ->>> ray.init() ->>> fed.init(addresses=addresses, party="Alice", tls_config=tls_config) - -Successfully to connect to current Ray cluster in party `Alice`