Skip to content

Commit

Permalink
Merge branch 'main' into fds-add-vertical-size-partitioner
Browse files Browse the repository at this point in the history
  • Loading branch information
jafermarq authored Dec 18, 2024
2 parents c85f4b7 + 35973cd commit ae35311
Show file tree
Hide file tree
Showing 11 changed files with 1,967 additions and 804 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
2 changes: 2 additions & 0 deletions datasets/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ classifiers = [
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
Expand Down
2 changes: 1 addition & 1 deletion examples/quickstart-huggingface/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ authors = [
{ name = "Kaushik Amar Das", email = "[email protected]" },
]
dependencies = [
"flwr[simulation]==1.12.0",
"flwr[simulation]>=1.13.1",
"flwr-datasets>=0.3.0",
"torch==2.4.0",
"transformers>=4.30.0,<5.0",
Expand Down
3 changes: 3 additions & 0 deletions examples/xgboost-quickstart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ Install the dependencies defined in `pyproject.toml` as well as the `xgboost_qui
pip install -e .
```

> \[!NOTE\]
> For MacOSX users, you may need to additionally run `brew install libomp` to install OpenMP runtime.
## Run the project

You can run your Flower project in both _simulation_ and _deployment_ mode without making changes to the code. If you are starting with Flower, we recommend you using the _simulation_ mode as it requires fewer components to be launched manually. By default, `flwr run` will make use of the Simulation Engine.
Expand Down
4 changes: 2 additions & 2 deletions examples/xgboost-quickstart/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ version = "1.0.0"
description = "Federated Learning with XGBoost and Flower (Quickstart Example)"
license = "Apache-2.0"
dependencies = [
"flwr-nightly[simulation]==1.11.0.dev20240826",
"flwr-datasets>=0.3.0",
"flwr[simulation]>=1.13.1",
"flwr-datasets>=0.4.0",
"xgboost>=2.0.0",
]

Expand Down
Loading

0 comments on commit ae35311

Please sign in to comment.