Skip to content

Commit

Permalink
Merge pull request #8655 from OpenMined/dev
Browse files Browse the repository at this point in the history
Update 0.8.6
  • Loading branch information
shubham3121 committed Apr 3, 2024
2 parents dd99cf5 + 1694063 commit 1199dbd
Show file tree
Hide file tree
Showing 54 changed files with 2,115 additions and 3,574 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.8.5
current_version = 0.8.5-post.2
tag = False
tag_name = {new_version}
commit = True
Expand Down
2 changes: 1 addition & 1 deletion .bumpversion_stable.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.8.5
current_version = 0.8.5-post.2
tag = False
tag_name = {new_version}
commit = True
Expand Down
84 changes: 83 additions & 1 deletion .github/workflows/cd-post-release-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,30 @@ on:
required: true
type: string

release_platform:
description: "Release Platform"
required: true
type: choice
options:
- "REAL_PYPI"
- "TEST_PYPI"

workflow_call:
inputs:
syft_version:
description: "Syft version to test"
required: true
type: string

release_platform:
description: "Release Platform"
required: true
type: string
default: "REAL_PYPI"

jobs:
notebook-test-hagrid:
if: github.event.inputs.release_platform == 'REAL_PYPI'
strategy:
max-parallel: 99
matrix:
Expand Down Expand Up @@ -154,14 +169,21 @@ jobs:
${{ runner.os }}-pip-py${{ matrix.python-version }}-
- name: Install Syft
shell: bash
run: |
pip install syft==${{ inputs.syft_version }}
if [[ ${{inputs.release_platform}} == "REAL_PYPI" ]]; then
pip install syft==${{inputs.syft_version}}
fi
if [[ ${{ inputs.release_platform }} == "TEST_PYPI" ]]; then
pip install --extra-index-url https://test.pypi.org/simple/ syft==${{inputs.syft_version}}
fi
- name: Check Syft version
run: |
python -c "import syft; print(syft.__version__)"
notebook-test-k8s-k3d:
if: github.event.inputs.release_platform == 'REAL_PYPI'
strategy:
max-parallel: 99
matrix:
Expand Down Expand Up @@ -216,3 +238,63 @@ jobs:
SYFT_VERSION: ${{ inputs.syft_version }}
run: |
tox -e syft.test.helm
# This job is used to test the syft unit tests on Test PyPi
syft-unit-tests:
strategy:
max-parallel: 99
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ["3.12", "3.11", "3.10"]
runs-on: ${{ matrix.os }}
steps:
- name: System Architecture
run: |
echo "System Architecture: $(uname -m)"
echo "System Version: $(uname -a)"
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5

with:
python-version: ${{ matrix.python-version }}

- name: Upgrade pip
run: |
python -m pip install --upgrade --user pip
- name: Get pip cache dir
id: pip-cache
shell: bash
run: |
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
- name: pip cache
uses: actions/cache@v4
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-py${{ matrix.python-version }}-${{ hashFiles('setup.cfg') }}
restore-keys: |
${{ runner.os }}-pip-py${{ matrix.python-version }}-
- name: Install Syft
env:
SYFT_VERSION: ${{ inputs.syft_version }}
run: |
if [[ ${{ inputs.release_platform }} == "TEST_PYPI" ]]; then
pip install --extra-index-url https://test.pypi.org/simple/ syft[data_science,dev]==${{ inputs.syft_version }}
fi
if [[ ${{ inputs.release_platform }} == "REAL_PYPI" ]]; then
pip install syft[data_science,dev]==${{ inputs.syft_version }}
fi
- name: Install Hagrid, tox and uv
run: |
pip install -U hagrid
pip install --upgrade pip uv==0.1.18 tox tox-uv==1.5.1 tox-current-env
- name: Run unit tests
run: |
tox -e syft.test.unit --current-env
2 changes: 2 additions & 0 deletions .github/workflows/cd-syft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,7 @@ jobs:

outputs:
syft_version: ${{ steps.release_checks.outputs.syft_version }}
release_platform: ${{ github.event.inputs.release_platform }}

steps:
- name: Permission to home directory
Expand Down Expand Up @@ -563,3 +564,4 @@ jobs:
uses: OpenMined/PySyft/.github/workflows/cd-post-release-tests.yml@dev
with:
syft_version: ${{ needs.deploy-syft.outputs.syft_version }}
release_platform: ${{ github.event.inputs.release_platform}}
2 changes: 1 addition & 1 deletion .github/workflows/pr-tests-hagrid.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:
if: steps.changes.outputs.hagrid == 'true'
run: |
bandit -r hagrid
safety check -i 42923 -i 54229 -i 54230 -i 54230 -i 54229 -i 62044 -i 65213
safety check -i 42923 -i 54229 -i 54230 -i 54230 -i 54229 -i 62044 -i 65213 -i 54564
- name: Run normal tests
if: steps.changes.outputs.hagrid == 'true'
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/pr-tests-syft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ jobs:
python-version: ["3.12"]
deployment-type: ["python"]
notebook-paths: ["tutorials"]
bump-version: ["False"]
include:
- python-version: "3.11"
os: "ubuntu-latest"
Expand All @@ -119,6 +120,11 @@ jobs:
os: "ubuntu-latest"
deployment-type: "python"
notebook-paths: "tutorials"
- python-version: "3.12"
os: "ubuntu-latest"
deployment-type: "python"
notebook-paths: "tutorials"
bump-version: "True"

runs-on: ${{ matrix.os }}
steps:
Expand Down Expand Up @@ -183,6 +189,7 @@ jobs:
env:
ORCHESTRA_DEPLOYMENT_TYPE: "${{ matrix.deployment-type }}"
TEST_NOTEBOOK_PATHS: "${{ matrix.notebook-paths }}"
BUMP_VERSION: "${{ matrix.bump-version }}"
with:
timeout_seconds: 2400
max_attempts: 3
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ helm install ... --set ingress.class="gce"

`0.9.0` - Coming soon...
`0.8.6` (Beta) - `dev` branch 👈🏽 <a href="https://github.com/OpenMined/PySyft/tree/dev/notebooks/api/0.8">API</a> - Coming soon...
`0.8.5` (Stable) - <a href="https://github.com/OpenMined/PySyft/tree/0.8.5/notebooks/api/0.8">API</a>
`0.8.5-post.2` (Stable) - <a href="https://github.com/OpenMined/PySyft/tree/0.8.5-post.2/notebooks/api/0.8">API</a>

Deprecated:

Expand Down
4 changes: 2 additions & 2 deletions VERSION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Mono Repo Global Version
__version__ = "0.8.5"
# Mono Repo Global Version
__version__ = "0.8.5-post.2"
# elsewhere we can call this file: `python VERSION` and simply take the stdout

# stdlib
Expand Down
16 changes: 9 additions & 7 deletions notebooks/api/0.8/06-multiple-code-requests.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
"metadata": {},
"outputs": [],
"source": [
"dataset2 = sy.Dataset(name=\"My Sample Dataset - II\")\n",
"dataset2 = sy.Dataset(name=\"Age Dataset\")\n",
"asset2 = sy.Asset(name=\"Sample Data - II\")\n",
"asset2.set_obj(sample_data * 10)\n",
"asset2.set_mock(mock_sample_data * 10, mock_is_real=False)\n",
Expand Down Expand Up @@ -174,7 +174,7 @@
"metadata": {},
"outputs": [],
"source": [
"assert len(datasets) == 2\n",
"assert len(datasets) == 1\n",
"dataset_ptr = datasets[0]\n",
"dataset_ptr"
]
Expand Down Expand Up @@ -477,8 +477,9 @@
"metadata": {},
"outputs": [],
"source": [
"datasets = ds_client.datasets.search(name=\"My Sample Dataset - II\")\n",
"dataset_ptr2 = datasets[0]"
"datasets = ds_client.datasets.search(name=\"Age Dataset\")\n",
"dataset_ptr2 = datasets[0]\n",
"dataset_ptr2"
]
},
{
Expand All @@ -489,7 +490,8 @@
"outputs": [],
"source": [
"# Validate if input policy is violated\n",
"sum_ptr = ds_client.code.calculate_sum(data=dataset_ptr2.assets[0])"
"sum_ptr = ds_client.code.calculate_sum(data=dataset_ptr2.assets[0])\n",
"sum_ptr"
]
},
{
Expand All @@ -499,7 +501,7 @@
"metadata": {},
"outputs": [],
"source": [
"assert isinstance(sum_ptr, sy.SyftError), sum_ptr"
"assert isinstance(sum_ptr, sy.SyftError), (sum_ptr, str(dataset_ptr2.assets[0]))"
]
},
{
Expand Down Expand Up @@ -547,7 +549,7 @@
},
"outputs": [],
"source": [
"if node.node_type.value == \"python\":\n",
"if node.deployment_type.value in [\"python\", \"single_container\"]:\n",
" node.land()"
]
},
Expand Down
2 changes: 1 addition & 1 deletion packages/grid/VERSION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Mono Repo Global Version
__version__ = "0.8.5"
__version__ = "0.8.5-post.2"
# elsewhere we can call this file: `python VERSION` and simply take the stdout

# stdlib
Expand Down
2 changes: 1 addition & 1 deletion packages/grid/backend/worker_cpu.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# Later we'd want to uninstall old python, and then install a new python runtime...
# ... but pre-built syft deps may break!

ARG SYFT_VERSION_TAG="0.8.5"
ARG SYFT_VERSION_TAG="0.8.5-post.2"
FROM openmined/grid-backend:${SYFT_VERSION_TAG}

ARG PYTHON_VERSION="3.12"
Expand Down
2 changes: 1 addition & 1 deletion packages/grid/devspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ vars:
DEVSPACE_ENV_FILE: "default.env"
CONTAINER_REGISTRY: "docker.io"
NODE_NAME: "mynode"
VERSION: "0.8.5"
VERSION: "0.8.5-post.2"

# This is a list of `images` that DevSpace can build for this project
# We recommend to skip image building during development (devspace dev) as much as possible
Expand Down
2 changes: 1 addition & 1 deletion packages/grid/frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pygrid-ui",
"version": "0.8.5",
"version": "0.8.5-post.2",
"private": true,
"scripts": {
"dev": "pnpm i && vite dev --host --port 80",
Expand Down

0 comments on commit 1199dbd

Please sign in to comment.