Skip to content

Commit

Permalink
feat(datasets) Update installation guide (#4731)
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-narozniak authored Dec 18, 2024
1 parent d3aea24 commit 35973cd
Showing 1 changed file with 31 additions and 4 deletions.
35 changes: 31 additions & 4 deletions datasets/docs/source/how-to-install-flwr-datasets.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Installation
Python Version
--------------

Flower Datasets requires `Python 3.8 <https://docs.python.org/3.8/>`_ or above.
Flower Datasets requires `Python 3.9 <https://docs.python.org/3.9/>`_ or above.


Install stable release (pip)
Expand All @@ -20,14 +20,41 @@ For vision datasets (e.g. MNIST, CIFAR10) ``flwr-datasets`` should be installed

.. code-block:: bash
python -m pip install flwr_datasets[vision]
python -m pip install "flwr-datasets[vision]"
For audio datasets (e.g. Speech Command) ``flwr-datasets`` should be installed with the ``audio`` extra

.. code-block:: bash
python -m pip install flwr_datasets[audio]
python -m pip install "flwr-datasets[audio]"
Install directly from GitHub (pip)
----------------------------------

Installing Flower Datasets directly from GitHub ensures you have access to the most up-to-date version.
If you encounter any issues or bugs, you may be directed to a specific branch containing a fix before
it becomes part of an official release.

.. code-block:: bash
python -m pip install "flwr-datasets@git+https://github.com/adap/flower.git"\
"@TYPE-HERE-BRANCH-NAME#subdirectory=datasets"
Similarly to the situation before, you can specify the ``vision`` or ``audio`` extra after the name of the library.

.. code-block:: bash
python -m pip install "flwr-datasets[vision]@git+https://github.com/adap/flower.git"\
"@TYPE-HERE-BRANCH-NAME#subdirectory=datasets"
e.g. for the main branch:

.. code-block:: bash
python -m pip install "flwr-datasets@git+https://github.com/adap/flower.git"\
"@main#subdirectory=datasets"
Since `flwr-datasets` is a part of the Flower repository, the `subdirectory` parameter (at the end of the URL) is used to specify the package location in the GitHub repo.

Verify installation
-------------------
Expand All @@ -38,7 +65,7 @@ The following command can be used to verify if Flower Datasets was successfully
python -c "import flwr_datasets;print(flwr_datasets.__version__)"
If everything worked, it should print the version of Flower Datasets to the command line:
If everything works, it should print the version of Flower Datasets to the command line:

.. code-block:: none
Expand Down

0 comments on commit 35973cd

Please sign in to comment.