|
27 | 27 | },
|
28 | 28 | {
|
29 | 29 | "cell_type": "code",
|
30 |
| - "execution_count": 1, |
| 30 | + "execution_count": null, |
31 | 31 | "metadata": {},
|
32 | 32 | "outputs": [],
|
33 | 33 | "source": [
|
|
46 | 46 | },
|
47 | 47 | {
|
48 | 48 | "cell_type": "code",
|
49 |
| - "execution_count": 2, |
| 49 | + "execution_count": null, |
50 | 50 | "metadata": {},
|
51 |
| - "outputs": [ |
52 |
| - { |
53 |
| - "name": "stdout", |
54 |
| - "output_type": "stream", |
55 |
| - "text": [ |
56 |
| - "a working folder for the admin exists!!!\n" |
57 |
| - ] |
58 |
| - } |
59 |
| - ], |
| 51 | + "outputs": [], |
60 | 52 | "source": [
|
61 | 53 | "admin_path = \"poc/admin/startup/\"\n",
|
62 | 54 | "\n",
|
|
73 | 65 | },
|
74 | 66 | {
|
75 | 67 | "cell_type": "code",
|
76 |
| - "execution_count": 3, |
| 68 | + "execution_count": null, |
77 | 69 | "metadata": {},
|
78 | 70 | "outputs": [],
|
79 | 71 | "source": [
|
80 | 72 | "!mkdir -p poc/admin/transfer\n",
|
81 |
| - "!cp -r hello_monai/ poc/admin/transfer/" |
| 73 | + "!cp -r hello-monai/ poc/admin/transfer/" |
82 | 74 | ]
|
83 | 75 | },
|
84 | 76 | {
|
85 | 77 | "cell_type": "code",
|
86 |
| - "execution_count": 4, |
| 78 | + "execution_count": null, |
87 | 79 | "metadata": {},
|
88 |
| - "outputs": [ |
89 |
| - { |
90 |
| - "data": { |
91 |
| - "text/plain": [ |
92 |
| - "['hello_monai']" |
93 |
| - ] |
94 |
| - }, |
95 |
| - "execution_count": 4, |
96 |
| - "metadata": {}, |
97 |
| - "output_type": "execute_result" |
98 |
| - } |
99 |
| - ], |
| 80 | + "outputs": [], |
100 | 81 | "source": [
|
101 | 82 | "os.listdir(\"poc/admin/transfer/\")"
|
102 | 83 | ]
|
103 | 84 | },
|
104 | 85 | {
|
105 | 86 | "cell_type": "code",
|
106 |
| - "execution_count": 5, |
| 87 | + "execution_count": null, |
107 | 88 | "metadata": {},
|
108 |
| - "outputs": [ |
109 |
| - { |
110 |
| - "data": { |
111 |
| - "text/plain": [ |
112 |
| - "['fl_admin.sh']" |
113 |
| - ] |
114 |
| - }, |
115 |
| - "execution_count": 5, |
116 |
| - "metadata": {}, |
117 |
| - "output_type": "execute_result" |
118 |
| - } |
119 |
| - ], |
| 89 | + "outputs": [], |
120 | 90 | "source": [
|
121 | 91 | "os.listdir(admin_path)"
|
122 | 92 | ]
|
|
144 | 114 | },
|
145 | 115 | {
|
146 | 116 | "cell_type": "code",
|
147 |
| - "execution_count": 6, |
| 117 | + "execution_count": null, |
148 | 118 | "metadata": {},
|
149 |
| - "outputs": [ |
150 |
| - { |
151 |
| - "data": { |
152 |
| - "text/html": [ |
153 |
| - "<a href=\"\", data-commandlinker-command=\"terminal:create-new\"> Open a new terminal</a>" |
154 |
| - ], |
155 |
| - "text/plain": [ |
156 |
| - "<IPython.core.display.HTML object>" |
157 |
| - ] |
158 |
| - }, |
159 |
| - "execution_count": 6, |
160 |
| - "metadata": {}, |
161 |
| - "output_type": "execute_result" |
162 |
| - } |
163 |
| - ], |
| 119 | + "outputs": [], |
164 | 120 | "source": [
|
165 | 121 | "HTML('<a href=\"\", data-commandlinker-command=\"terminal:create-new\"> Open a new terminal</a>')"
|
166 | 122 | ]
|
|
192 | 148 | "\n",
|
193 | 149 | "The commands can be:\n",
|
194 | 150 | "```\n",
|
195 |
| - "upload_app hello_monai\n", |
| 151 | + "upload_app hello-monai\n", |
196 | 152 | "set_run_number 1\n",
|
197 |
| - "deploy_app hello_monai server\n", |
198 |
| - "deploy_app hello_monai client\n", |
199 |
| - "```\n", |
200 |
| - "\n", |
201 |
| - "Now, let's check if the folder has been distributed into the server and all client(s):" |
202 |
| - ] |
203 |
| - }, |
204 |
| - { |
205 |
| - "cell_type": "code", |
206 |
| - "execution_count": 7, |
207 |
| - "metadata": {}, |
208 |
| - "outputs": [ |
209 |
| - { |
210 |
| - "name": "stdout", |
211 |
| - "output_type": "stream", |
212 |
| - "text": [ |
213 |
| - "config files on server: ['app_server', 'fl_app.txt']\n", |
214 |
| - " \n", |
215 |
| - "config files on site-1: ['app_site-1', 'fl_app.txt']\n", |
216 |
| - " \n", |
217 |
| - "config files on site-2: ['fl_app.txt', 'app_site-2']\n", |
218 |
| - " \n" |
219 |
| - ] |
220 |
| - } |
221 |
| - ], |
222 |
| - "source": [ |
223 |
| - "run_file = \"run_1\"\n", |
224 |
| - "\n", |
225 |
| - "poc_path = \"poc/\"\n", |
226 |
| - "\n", |
227 |
| - "for name in [\"server\", \"site-1\", \"site-2\"]:\n", |
228 |
| - " path = os.path.join(poc_path, name, run_file)\n", |
229 |
| - " if os.path.exists(path):\n", |
230 |
| - " print(\"config files on {}: {}\".\n", |
231 |
| - " format(name, os.listdir(path)))\n", |
232 |
| - " print(\" \")" |
| 153 | + "deploy_app hello-monai server\n", |
| 154 | + "deploy_app hello-monai client\n", |
| 155 | + "```" |
233 | 156 | ]
|
234 | 157 | },
|
235 | 158 | {
|
236 | 159 | "cell_type": "markdown",
|
237 | 160 | "metadata": {},
|
238 | 161 | "source": [
|
239 |
| - "This example prepares two different data list files: `dataset_part1.json` and `dataset_part2.json`, and they have the same validation set and totally different training set. The default file used in `config_train.json` is `config/dataset_part1.json`. Therefore, if you want to let two clients train on different data, you can switch to use `dataset_part2.json` for `org1-b`.\n", |
| 162 | + "This example prepares two different data list files: `dataset_part1.json` and `dataset_part2.json`, and they have the same validation set and totally different training sets. The default file used in `config_train.json` is `config/dataset_part1.json`. Therefore, if you want to let two clients train on different data, you can switch to use `dataset_part2.json` for `org1-b`.\n", |
240 | 163 | "\n",
|
241 | 164 | "[Link to site-1 config](poc/site-1/run_1/app_site-1/config/config_train.json)\n",
|
242 | 165 | "\n",
|
|
250 | 173 | "### (Optional) Copy Dataset\n",
|
251 | 174 | "\n",
|
252 | 175 | "After starting a client (for example `site-1`), the Spleen dataset will be downloaded into:\n",
|
253 |
| - "`run_1/app_site-1/Task09_Spleen.tar`.\n", |
| 176 | + "`poc/site-1/`.\n", |
254 | 177 | "\n",
|
255 |
| - "To prevent repeatedly downloading the dataset, you can copy the uncompressed `Task09_Spleen` into the corresponding place after running the `deploy_app` command.\n", |
256 |
| - "For example:\n", |
| 178 | + "If you already have the `Task09_Spleen`, you can copy it into the corresponding place directly to prevent repeatedly download. For example:\n", |
257 | 179 | "\n",
|
258 | 180 | "```\n",
|
259 |
| - "cp -r /path-to-dataset/Task09_Spleen poc/site-1/run_2/app_site-1/\n", |
| 181 | + "cp -r /path-to-dataset/Task09_Spleen poc/site-1/\n", |
260 | 182 | "```"
|
261 | 183 | ]
|
262 | 184 | },
|
|
0 commit comments