diff --git a/docs/examples/federated_statistics_overview.rst b/docs/examples/federated_statistics_overview.rst index 759fb69bca..56323a55e7 100644 --- a/docs/examples/federated_statistics_overview.rst +++ b/docs/examples/federated_statistics_overview.rst @@ -214,6 +214,14 @@ To calculate federated quantiles, we use the fastdigest package, which satisfies * Avoids transmitting large amounts of data * No system-level dependency +Pin ``fastdigest`` to ``0.4.0``: + +.. code-block:: text + + pip install fastdigest==0.4.0 + +Newer ``fastdigest`` releases changed the TDigest API and are planned to be adopted in a later branch. + The tdigest algorithm only carries the cluster coordinates, initially each data point is in its own cluster. By default, we compress with max_bin = sqrt(datasize) to compress the coordinates, so the data won't leak. You can always override max_bins if you prefer more or less compression. For detailed implementation instructions and configuration examples, please refer to the :github_nvflare_link:`Federated Statistics README `. diff --git a/docs/hello-world/hello-tabular-stats/index.rst b/docs/hello-world/hello-tabular-stats/index.rst index 4f1fdf20ae..6d0bb3cc9d 100644 --- a/docs/hello-world/hello-tabular-stats/index.rst +++ b/docs/hello-world/hello-tabular-stats/index.rst @@ -38,7 +38,7 @@ Install the dependency Install Optional Quantile Dependency -- fastdigest ------------------------------------------------------------ -If you intend to calculate quantiles, you need to install fastdigest. +If you intend to calculate quantiles, install ``fastdigest==0.4.0``. Skip this step if you don't need quantile statistics. diff --git a/examples/advanced/federated-statistics/df_stats/README.md b/examples/advanced/federated-statistics/df_stats/README.md index eb5bafc190..2ca34a35dc 100644 --- a/examples/advanced/federated-statistics/df_stats/README.md +++ b/examples/advanced/federated-statistics/df_stats/README.md @@ -53,6 +53,12 @@ We chose the fastdigest Python package, a Rust-based package. The digest only ca initially, each data point is in its own cluster. By default, we will compress with max_bin = sqrt(datasize) to compress the coordinates, so the data won't leak. You can always override max_bins if you prefer more or less compression. +Install and pin: + +```bash +pip install fastdigest==0.4.0 +``` + ## Configuration and Code diff --git a/examples/hello-world/hello-tabular-stats/README.md b/examples/hello-world/hello-tabular-stats/README.md index 8c3cad74bf..02ed235819 100644 --- a/examples/hello-world/hello-tabular-stats/README.md +++ b/examples/hello-world/hello-tabular-stats/README.md @@ -33,7 +33,7 @@ pip install -r requirements.txt ### Install Optional Quantile Dependency -- fastdigest -If you intend to calculate quantiles, you need to install fastdigest. +If you intend to calculate quantiles, install `fastdigest==0.4.0`. Skip this step if you don't need quantile statistics. diff --git a/examples/hello-world/hello-tabular-stats/df_stats.ipynb b/examples/hello-world/hello-tabular-stats/df_stats.ipynb index 877f711534..0dad880503 100644 --- a/examples/hello-world/hello-tabular-stats/df_stats.ipynb +++ b/examples/hello-world/hello-tabular-stats/df_stats.ipynb @@ -86,7 +86,7 @@ "source": [ "## Install Optional Quantile Dependency – fastdigest\n", "\n", - "If you intend to calculate quantiles, you need to install fastdigest.\n", + "If you intend to calculate quantiles, install `fastdigest==0.4.0`.\n", "\n", "Skip this step if you don’t need quantile statistics.\n", "```\n", diff --git a/examples/tutorials/self-paced-training/part-1_federated_learning_introduction/chapter-2_develop_federated_learning_applications/02.1_federated_statistics/federated_statistics_with_tabular_data/federated_statistics_with_tabular_data.ipynb b/examples/tutorials/self-paced-training/part-1_federated_learning_introduction/chapter-2_develop_federated_learning_applications/02.1_federated_statistics/federated_statistics_with_tabular_data/federated_statistics_with_tabular_data.ipynb index be1e04037b..d7a9a462fb 100644 --- a/examples/tutorials/self-paced-training/part-1_federated_learning_introduction/chapter-2_develop_federated_learning_applications/02.1_federated_statistics/federated_statistics_with_tabular_data/federated_statistics_with_tabular_data.ipynb +++ b/examples/tutorials/self-paced-training/part-1_federated_learning_introduction/chapter-2_develop_federated_learning_applications/02.1_federated_statistics/federated_statistics_with_tabular_data/federated_statistics_with_tabular_data.ipynb @@ -48,7 +48,7 @@ "> Sidebar: \n", "> **Installing fastdigest**\n", ">\n", - "> If you intend to calculate quantiles, you need to install fastdigest. the fastdigest not included in the requirements.txt file. If you are not calculating quantiles, you can skip this step.\n", + "> If you intend to calculate quantiles, install `fastdigest==0.4.0`. the fastdigest not included in the requirements.txt file. If you are not calculating quantiles, you can skip this step.\n", ">\n", "> ```bash\n", "> pip install fastdigest==0.4.0\n", diff --git a/setup.cfg b/setup.cfg index 1ad9615d64..53bf66b724 100644 --- a/setup.cfg +++ b/setup.cfg @@ -102,6 +102,7 @@ test_support = test = %(all)s %(test_support)s + fastdigest==0.4.0; python_version < "3.14" test_mac = %(all_mac)s