Skip to content

Commit cb661a5

Browse files
committed
set previous version manually, fix first notebook server conn
1 parent 95f0aec commit cb661a5

4 files changed

Lines changed: 9 additions & 21 deletions

File tree

notebooks/tutorials/version-upgrades/0-prepare-migration-data.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@
6969
" name=\"test_upgradability\",\n",
7070
" dev_mode=True,\n",
7171
" reset=True,\n",
72-
" local_db=True,\n",
7372
" n_consumers=2,\n",
7473
" create_producer=True,\n",
74+
" port=\"auto\",\n",
7575
")"
7676
]
7777
},

notebooks/tutorials/version-upgrades/1-dump-database-to-file.ipynb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,8 @@
2525
"server = sy.orchestra.launch(\n",
2626
" name=\"test_upgradability\",\n",
2727
" dev_mode=True,\n",
28-
" local_db=True,\n",
29-
" n_consumers=2,\n",
30-
" create_producer=True,\n",
28+
" reset=False,\n",
29+
" port=\"auto\",\n",
3130
" migrate=False,\n",
3231
")\n",
3332
"\n",

notebooks/tutorials/version-upgrades/2-migrate-from-file.ipynb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@
7272
"outputs": [],
7373
"source": [
7474
"migration_data_dir = Path(os.getenv(\"MIGRATION_DATA_DIR\", \".\"))\n",
75-
"# migration_data_dir = Path(\"/Users/eelco/dev/PySyft/.tox/.tmp/migration\")\n",
7675
"blob_path = migration_data_dir / \"migration.blob\"\n",
7776
"yaml_path = migration_data_dir / \"migration.yaml\"\n",
7877
"\n",

tox.ini

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1077,21 +1077,15 @@ commands =
10771077
[testenv:migration.prepare]
10781078
description = Prepare Migration Data
10791079
pip_pre = True
1080+
setenv =
1081+
MIGRATION_DATA_DIR = {env:MIGRATION_DATA_DIR:{temp_dir}/migration}
10801082
deps =
10811083
nbmake
10821084
requests
1085+
syft==0.9.0
10831086
allowlist_externals =
10841087
bash
10851088
python
1086-
1087-
commands_pre =
1088-
bash -c '\
1089-
LATEST_SYFT_VERSION=$(python ./scripts/latest_pypi_version.py) &&\
1090-
export LATEST_SYFT_VERSION &&\
1091-
python -m pip install syft==$LATEST_SYFT_VERSION\
1092-
'
1093-
setenv =
1094-
MIGRATION_DATA_DIR = {env:MIGRATION_DATA_DIR:{temp_dir}/migration}
10951089
commands =
10961090
; Run notebooks to prepare migration data
10971091
bash -c 'python -c "import syft as sy; print(\"Migrating from syft version:\", sy.__version__)"'
@@ -1128,6 +1122,7 @@ passenv=HOME, USER, EXTERNAL_REGISTRY_USERNAME, EXTERNAL_REGISTRY_PASSWORD
11281122
deps =
11291123
requests
11301124
nbmake
1125+
syft==0.9.0
11311126
allowlist_externals =
11321127
bash
11331128
tox
@@ -1140,6 +1135,7 @@ setenv =
11401135
CLUSTER_NAME = syft-migration-source
11411136
CLUSTER_HTTP_PORT = {env:SERVER_PORT:8080}
11421137
MIGRATION_DATA_DIR = {env:MIGRATION_DATA_DIR:{temp_dir}/migration}
1138+
LATEST_SYFT_VERSION = 0.9.0
11431139
commands =
11441140
bash -c "env; date; k3d version"
11451141
bash -c "k3d cluster delete ${CLUSTER_NAME} || true"
@@ -1148,7 +1144,6 @@ commands =
11481144

11491145
# Deploy cluster from latest stable syft version with Helm
11501146
bash -c '\
1151-
LATEST_SYFT_VERSION=$(python ./scripts/latest_pypi_version.py) &&\
11521147
echo "Installing helm charts from repo for syft version: ${LATEST_SYFT_VERSION}"; \
11531148
helm repo add openmined https://openmined.github.io/PySyft/helm; \
11541149
helm repo update openmined; \
@@ -1158,11 +1153,6 @@ commands =
11581153
; wait for everything else to be loaded
11591154
tox -e dev.k8s.ready -- frontend backend mongo proxy seaweedfs registry
11601155

1161-
; Install latest stable syft version
1162-
bash -c '\
1163-
LATEST_SYFT_VERSION=$(python ./scripts/latest_pypi_version.py) &&\
1164-
python -m pip install syft==$LATEST_SYFT_VERSION\
1165-
'
11661156
bash -c 'python -c "import syft as sy; print(\"Migrating from syft version:\", sy.__version__)"'
11671157

11681158
; Run notebooks to prepare migration data
@@ -1202,7 +1192,7 @@ allowlist_externals =
12021192
echo
12031193
commands =
12041194
# create migration data files on previous syft version
1205-
tox -e migration.prepare
1195+
tox -e migration.k8s.prepare
12061196

12071197
# Make migration.yaml available for devspace migration
12081198
bash -c 'cp ${MIGRATION_DATA_DIR}/migration.yaml packages/grid/helm/examples/dev/migration.yaml'

0 commit comments

Comments
 (0)