Skip to content

Commit

Permalink
Merge pull request #155 from mithril-security/v0.3.6
Browse files Browse the repository at this point in the history
V0.3.6
  • Loading branch information
Lucas Bourtoule authored Dec 23, 2022
2 parents f7c5973 + 7d3a1f0 commit 939cc25
Show file tree
Hide file tree
Showing 22 changed files with 1,387 additions and 1,466 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ ex.c
**/examples/data
**/examples/models
**/pb
**/libtorch
**/libtorch*
*.pem
*.key.pem
*.html
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ RUN rustup component add rustfmt \

WORKDIR /app

RUN wget 'https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-1.12.1%2Bcpu.zip' \
&& unzip 'libtorch-cxx11-abi-shared-with-deps-1.12.1+cpu.zip'
RUN wget 'https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-1.13.1%2Bcpu.zip' \
&& unzip 'libtorch-cxx11-abi-shared-with-deps-1.13.1+cpu.zip'

COPY ./server /app/server
COPY ./protos /app/protos
Expand Down
2 changes: 1 addition & 1 deletion client/src/bastionlab/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.3.5"
__version__ = "0.3.6"
70 changes: 31 additions & 39 deletions docs/docs/quick-tour/quick-tour.ipynb

Large diffs are not rendered by default.

27 changes: 17 additions & 10 deletions docs/docs/tutorials/authentication.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,18 @@
"## Pre-requisites\n",
"___________________________________________ \n",
"\n",
"<br>\n",
"### Technical requirements\n",
"\n",
">You'll need Python3.7 (or greater) and Docker installed on your machine to run this tutorial. You can refer to our [Installation section](https://bastionlab.readthedocs.io/en/latest/docs/getting-started/installation/) to check the specific technical requirements needed by BastionLab's Client and Server, as well as other methods to install them if the following ones are not for you. \n",
"To start this tutorial, ensure the following are already installed in your system:\n",
"- Python3.7 or greater (get the latest version of Python at https://www.python.org/downloads/ or with your operating system’s package manager)\n",
"- [Python Pip](https://pypi.org/project/pip/) (PyPi), the package manager\n",
"- [Docker](https://www.docker.com/)\n",
"\n",
"### Install BastionLab Client \n",
"##### from PyPi"
"Here's the [Docker official tutorial](https://docker-curriculum.com/) to set it up on your computer.\n",
"\n",
"### Pip packages\n",
"\n",
"In order to run this notebook, you will also need to install the bastionlab package by running the following code block."
]
},
{
Expand All @@ -48,16 +54,17 @@
"metadata": {},
"outputs": [],
"source": [
"! pip install polars bastionlab"
"!pip install bastionlab"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"### BastionLab Server \n",
"#### Using the official docker image"
"### Installing the server\n",
"\n",
">You can refer to our [Installation section](https://bastionlab.readthedocs.io/en/latest/docs/getting-started/installation/) to check the specific technical requirements needed by BastionLab Server, as well as other methods to install if if the following one is not for you. "
]
},
{
Expand Down Expand Up @@ -535,7 +542,7 @@
"provenance": []
},
"kernelspec": {
"display_name": "Python 3",
"display_name": "env",
"language": "python",
"name": "python3"
},
Expand All @@ -549,11 +556,11 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.10 (default, Jun 22 2022, 20:18:18) \n[GCC 9.4.0]"
"version": "3.10.6 (main, Nov 14 2022, 16:10:14) [GCC 11.3.0]"
},
"vscode": {
"interpreter": {
"hash": "916dbcbb3f70747c44a77c7bcd40155683ae19c65e1c03b4aa3499c5328201f1"
"hash": "b62e9ff4e56dfa5f055fe055066e5a02d5f9234d63201164ad52aa7acce06a4c"
}
}
},
Expand Down
50 changes: 28 additions & 22 deletions docs/docs/tutorials/combining_datasets.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
"# Combining datasets\n",
"______________________________________________________\n",
"\n",
"<a target=\"_blank\" href=\"https://colab.research.google.com/github/mithril-security/bastionlab/blob/v0.3.6/docs/docs/tutorials/combining_datasets.ipynb\">\n",
" <p align=\"center\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/>\n",
"</a>\n",
"\n",
"Combining datasets allows us to train models or run queries on multiple datasets from different parties, which can lead to much more powerful results.\n",
"\n",
"Let's take an example: say 100 different hospitals around the world want to take part in a project to train a machine learning model to determine if a patient has Covid-19 based on a chest X-ray scan. The model will almost certainly be much more accurate and relevant to a more varied range of patients if this model is trained on a combined dataset from the 100 hospitals than from any one of these hospital.\n",
Expand All @@ -27,12 +31,12 @@
"\n",
"### Pip packages\n",
"\n",
"In order to run this notebook, you will also need to install Polars, Bastionlab and the bastionlab_server packages by running the following code block."
"In order to run this notebook, you will also need to install bastionlab and bastionlab_server packages by running the following code block."
]
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -55,12 +59,12 @@
"source": [
"### Launching the server\n",
"\n",
"The next step is to launch the server. The server exposes port `50056` for gRPC communication with clients and uses a default configuration (no authentication, default settings). For the purpose of this tutorial, these settings are sufficient and we won't change them. To launch the server, we simply use bastionlab_server's start method."
"The next step is to launch the server. The server exposes port `50056` for gRPC communication with clients and uses a default configuration (no authentication, default settings). For the purpose of this tutorial, these settings are sufficient and we won't change them. To launch the server, we simply use `bastionlab_server`'s `start()` method."
]
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -74,15 +78,17 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### Uploading our data frames to the server"
"### Uploading our dataset to the server"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"We will connect to the server via the `Connection()` constructor."
"We'll connect to the server by creating an instance of `Connection()` and supplying the constructor with the host of our docker instance.\n",
"\n",
">*In a typical workflow, the data owner would send a set of keys to the server, so that authorization can be required for all users at the point of connection. **BastionLab offers the authorization feature**, but as it's not the focus of this visualization tutorial, we will not use it. You can refer to the [authentication tutorial](https://bastionlab.readthedocs.io/en/latest/docs/tutorials/authentication/) if you want to set it up.*"
]
},
{
Expand Down Expand Up @@ -538,7 +544,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 6,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -684,7 +690,7 @@
"└───────────┴───────────────────┘"
]
},
"execution_count": 7,
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -695,7 +701,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 7,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -819,7 +825,7 @@
"└───────────┴────────┴────────┘"
]
},
"execution_count": 8,
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -846,7 +852,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 8,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -988,7 +994,7 @@
"└──────────┴───────────────────┴────────┴────────┘"
]
},
"execution_count": 9,
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -1008,7 +1014,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 9,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -1114,7 +1120,7 @@
"└───────────┴───────────────────┘"
]
},
"execution_count": 10,
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
Expand Down Expand Up @@ -1164,7 +1170,7 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 10,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -1270,7 +1276,7 @@
"└──────────┴─────────┘"
]
},
"execution_count": 12,
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -1288,7 +1294,7 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": 11,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -1394,7 +1400,7 @@
"└──────────┴────────────────┘"
]
},
"execution_count": 13,
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -1420,7 +1426,7 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": 12,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -1544,7 +1550,7 @@
"└──────────┴─────────┴────────────────┘"
]
},
"execution_count": 14,
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -1566,7 +1572,7 @@
},
{
"cell_type": "code",
"execution_count": 16,
"execution_count": 13,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -1591,7 +1597,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.6"
"version": "3.10.6 (main, Nov 14 2022, 16:10:14) [GCC 11.3.0]"
},
"orig_nbformat": 4,
"vscode": {
Expand Down
Loading

0 comments on commit 939cc25

Please sign in to comment.