Skip to content

Commit

Permalink
chore: bump dependencies for all examples
Browse files Browse the repository at this point in the history
Signed-off-by: SdgJlbl <[email protected]>
  • Loading branch information
SdgJlbl committed Sep 30, 2024
1 parent 644671a commit 450b071
Show file tree
Hide file tree
Showing 17 changed files with 1,149 additions and 1,266 deletions.
1 change: 1 addition & 0 deletions changes/441.changed
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Bump all examples dependencies.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
FROM python:3.12-slim

# install dependencies
RUN pip3 install 'pandas<2.0' 'numpy<2.0' substratools
RUN pip3 install pandas numpy substratools

# add your algorithm script to docker image
ADD federated_analytics_functions.py .
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
FROM python:3.12-slim

# install dependencies
RUN pip3 install 'pandas<2.0' 'numpy<2.0' substratools
RUN pip3 install pandas numpy substratools

# add your algorithm script to docker image
ADD federated_analytics_functions.py .
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
FROM python:3.12-slim

# install dependencies
RUN pip3 install 'pandas<2.0' 'numpy<2.0' substratools
RUN pip3 install pandas numpy substratools

# add your algorithm script to docker image
ADD federated_analytics_functions.py .
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
matplotlib==3.6.3
scikit-learn==1.5.0
matplotlib==3.9.2
scikit-learn==1.5.2
pandas==2.2.2
substra
substratools
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
FROM python:3.12-slim

# install dependencies
RUN pip3 install pandas 'numpy<2.0' 'scikit-learn==1.5.0' substratools
RUN pip3 install pandas numpy 'scikit-learn==1.5.2' substratools

# add your function script to docker image
ADD titanic_function_rf.py .
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
FROM python:3.12-slim

# install dependencies
RUN pip3 install pandas 'numpy<2.0' 'scikit-learn==1.5.0' substratools
RUN pip3 install pandas numpy 'scikit-learn==1.5.2' substratools

# add your function script to docker image
ADD titanic_function_rf.py .
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
FROM python:3.12-slim

# install dependencies
RUN pip3 install pandas 'numpy<2.0' 'scikit-learn==1.5.0' substratools
RUN pip3 install pandas numpy 'scikit-learn==1.5.2' substratools

# add your metrics script to docker image
ADD titanic_metrics.py .
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
matplotlib==3.6.3
scikit-learn==1.5.0
matplotlib==3.9.2
scikit-learn==1.5.2
pandas==2.2.2
substra
substratools
80 changes: 22 additions & 58 deletions docs/source/examples/substrafl/get_started/run_mnist_torch.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"from substra import Client\n",
Expand Down Expand Up @@ -78,9 +76,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"# Create a dictionary to easily access each client from its human-friendly id\n",
Expand Down Expand Up @@ -117,9 +113,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"import pathlib\n",
Expand Down Expand Up @@ -159,9 +153,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"from substra.sdk.schemas import DatasetSpec\n",
Expand Down Expand Up @@ -224,9 +216,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"from sklearn.metrics import accuracy_score\n",
Expand Down Expand Up @@ -283,9 +273,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"import torch\n",
Expand Down Expand Up @@ -338,9 +326,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"from substrafl.index_generator import NpIndexGenerator\n",
Expand Down Expand Up @@ -375,9 +361,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"class TorchDataset(torch.utils.data.Dataset):\n",
Expand Down Expand Up @@ -422,9 +406,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"from substrafl.algorithms.pytorch import TorchFedAvgAlgo\n",
Expand Down Expand Up @@ -459,9 +441,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"from substrafl.strategies import FedAvg\n",
Expand All @@ -486,9 +466,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"from substrafl.nodes import TrainDataNode\n",
Expand Down Expand Up @@ -525,9 +503,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"from substrafl.nodes import TestDataNode\n",
Expand Down Expand Up @@ -564,14 +540,12 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"from substrafl.dependency import Dependency\n",
"\n",
"dependencies = Dependency(pypi_dependencies=[\"numpy==1.26.4\", \"scikit-learn==1.5.0\", \"torch==2.2.1\", \"--extra-index-url https://download.pytorch.org/whl/cpu\"])"
"dependencies = Dependency(pypi_dependencies=[\"numpy==2.1.1\", \"scikit-learn==1.5.2\", \"torch==2.4.1\", \"--extra-index-url https://download.pytorch.org/whl/cpu\"])"
]
},
{
Expand Down Expand Up @@ -600,9 +574,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"from substrafl.experiment import execute_experiment\n",
Expand Down Expand Up @@ -651,9 +623,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"# The results will be available once the compute plan is completed\n",
Expand All @@ -670,9 +640,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"import pandas as pd\n",
Expand All @@ -692,9 +660,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"import matplotlib.pyplot as plt\n",
Expand Down Expand Up @@ -738,9 +704,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"from substrafl.model_loading import download_algo_state\n",
Expand All @@ -762,7 +726,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -776,9 +740,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.6"
"version": "3.10.9"
}
},
"nbformat": 4,
"nbformat_minor": 0
"nbformat_minor": 1
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
matplotlib==3.6.3
numpy==1.26.4
matplotlib==3.9.2
numpy==2.1.1
pandas==2.2.2
scikit-learn==1.5.0
scikit-learn==1.5.2
substrafl
torch==2.2.1
torchvision==0.17.1
torch==2.4.1
torchvision==0.19.1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
matplotlib==3.6.3
scikit-learn==1.5.0
numpy==1.26.4
matplotlib==3.9.2
scikit-learn==1.5.2
numpy==2.1.1
pandas==2.2.2
substrafl
Loading

0 comments on commit 450b071

Please sign in to comment.