Skip to content

Commit 47fa295

Browse files
Add files via upload
1 parent 655c2cf commit 47fa295

File tree

1 file changed

+34
-225
lines changed

1 file changed

+34
-225
lines changed

gpu/final_assignment.ipynb

Lines changed: 34 additions & 225 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
},
2020
{
2121
"cell_type": "code",
22-
"execution_count": 31,
22+
"execution_count": null,
2323
"metadata": {},
2424
"outputs": [],
2525
"source": [
@@ -60,7 +60,7 @@
6060
},
6161
{
6262
"cell_type": "code",
63-
"execution_count": 46,
63+
"execution_count": null,
6464
"metadata": {},
6565
"outputs": [],
6666
"source": [
@@ -109,7 +109,7 @@
109109
},
110110
{
111111
"cell_type": "code",
112-
"execution_count": 47,
112+
"execution_count": null,
113113
"metadata": {},
114114
"outputs": [],
115115
"source": [
@@ -151,7 +151,7 @@
151151
},
152152
{
153153
"cell_type": "code",
154-
"execution_count": 1,
154+
"execution_count": null,
155155
"metadata": {},
156156
"outputs": [],
157157
"source": [
@@ -193,7 +193,7 @@
193193
},
194194
{
195195
"cell_type": "code",
196-
"execution_count": 48,
196+
"execution_count": null,
197197
"metadata": {},
198198
"outputs": [],
199199
"source": [
@@ -262,7 +262,7 @@
262262
},
263263
{
264264
"cell_type": "code",
265-
"execution_count": 49,
265+
"execution_count": null,
266266
"metadata": {},
267267
"outputs": [],
268268
"source": [
@@ -311,17 +311,9 @@
311311
},
312312
{
313313
"cell_type": "code",
314-
"execution_count": 35,
315-
"metadata": {},
316-
"outputs": [
317-
{
318-
"name": "stdout",
319-
"output_type": "stream",
320-
"text": [
321-
"updating: keras_network.py (deflated 52%)\r\n"
322-
]
323-
}
324-
],
314+
"execution_count": null,
315+
"metadata": {},
316+
"outputs": [],
325317
"source": [
326318
"!zip keras-model.zip keras_network.py"
327319
]
@@ -335,44 +327,9 @@
335327
},
336328
{
337329
"cell_type": "code",
338-
"execution_count": 36,
339-
"metadata": {},
340-
"outputs": [
341-
{
342-
"name": "stdout",
343-
"output_type": "stream",
344-
"text": [
345-
"--2020-04-03 14:54:04-- https://clis.cloud.ibm.com/download/bluemix-cli/1.0.0/linux64/archive\n",
346-
"Resolving clis.cloud.ibm.com (clis.cloud.ibm.com)... 169.46.89.151, 169.62.254.80, 169.47.124.23\n",
347-
"Connecting to clis.cloud.ibm.com (clis.cloud.ibm.com)|169.46.89.151|:443... connected.\n",
348-
"HTTP request sent, awaiting response... 302 Found\n",
349-
"Location: https://public.dhe.ibm.com/cloud/bluemix/cli/bluemix-cli/1.0.0/binaries/IBM_Cloud_CLI_1.0.0_linux_amd64.tgz [following]\n",
350-
"--2020-04-03 14:54:04-- https://public.dhe.ibm.com/cloud/bluemix/cli/bluemix-cli/1.0.0/binaries/IBM_Cloud_CLI_1.0.0_linux_amd64.tgz\n",
351-
"Resolving public.dhe.ibm.com (public.dhe.ibm.com)... 129.35.224.112\n",
352-
"Connecting to public.dhe.ibm.com (public.dhe.ibm.com)|129.35.224.112|:443... connected.\n",
353-
"HTTP request sent, awaiting response... 200 OK\n",
354-
"Length: 16026729 (15M) [application/x-tar]\n",
355-
"Saving to: ‘archive.2’\n",
356-
"\n",
357-
"100%[======================================>] 16,026,729 1.83MB/s in 9.2s \n",
358-
"\n",
359-
"2020-04-03 14:54:14 (1.65 MB/s) - ‘archive.2’ saved [16026729/16026729]\n",
360-
"\n",
361-
"IBM_Cloud_CLI/\n",
362-
"IBM_Cloud_CLI/ibmcloud\n",
363-
"IBM_Cloud_CLI/ibmcloud.sig\n",
364-
"IBM_Cloud_CLI/ibmcloud-analytics\n",
365-
"IBM_Cloud_CLI/ibmcloud-analytics.sig\n",
366-
"IBM_Cloud_CLI/NOTICE\n",
367-
"IBM_Cloud_CLI/LICENSE\n",
368-
"IBM_Cloud_CLI/CF_CLI_Notices.txt\n",
369-
"IBM_Cloud_CLI/CF_CLI_SLC_Notices.txt\n",
370-
"IBM_Cloud_CLI/autocomplete/\n",
371-
"IBM_Cloud_CLI/autocomplete/bash_autocomplete\n",
372-
"IBM_Cloud_CLI/autocomplete/zsh_autocomplete\n"
373-
]
374-
}
375-
],
330+
"execution_count": null,
331+
"metadata": {},
332+
"outputs": [],
376333
"source": [
377334
"!wget https://clis.cloud.ibm.com/download/bluemix-cli/1.0.0/linux64/archive && tar xvfz archive"
378335
]
@@ -386,24 +343,9 @@
386343
},
387344
{
388345
"cell_type": "code",
389-
"execution_count": 37,
390-
"metadata": {},
391-
"outputs": [
392-
{
393-
"name": "stdout",
394-
"output_type": "stream",
395-
"text": [
396-
"Looking up '\u001b[36;1mmachine-learning\u001b[0m' from repository '\u001b[36;1mIBM Cloud\u001b[0m'...\n",
397-
"Plug-in '\u001b[36;1mmachine-learning\u001b[0m \u001b[36;1m3.0.2\u001b[0m' found in repository '\u001b[36;1mIBM Cloud\u001b[0m'\n",
398-
"Attempting to download the binary file...\n",
399-
" 19.14 MiB / 19.14 MiB [===========================================] 100.00% 11s\n",
400-
"20071911 bytes downloaded\n",
401-
"Installing binary...\n",
402-
"\u001b[32;1mOK\u001b[0m\n",
403-
"Plug-in '\u001b[36;1mmachine-learning 3.0.2\u001b[0m' was successfully installed into /home/dsxuser/.bluemix/plugins/machine-learning. Use '\u001b[33;1m./IBM_Cloud_CLI/ibmcloud plugin show machine-learning\u001b[0m' to show its details.\n"
404-
]
405-
}
406-
],
346+
"execution_count": null,
347+
"metadata": {},
348+
"outputs": [],
407349
"source": [
408350
"!./IBM_Cloud_CLI/ibmcloud plugin install -f machine-learning"
409351
]
@@ -426,49 +368,9 @@
426368
},
427369
{
428370
"cell_type": "code",
429-
"execution_count": 50,
430-
"metadata": {},
431-
"outputs": [
432-
{
433-
"name": "stdout",
434-
"output_type": "stream",
435-
"text": [
436-
"API endpoint: \u001b[36;1mhttps://cloud.ibm.com\u001b[0m\n",
437-
"Authenticating...\n",
438-
"\u001b[32;1mOK\u001b[0m\n",
439-
"\n",
440-
"Targeted account \u001b[36;1mRomeo Kienzler's Account (4b5f219cdaee498f9dac672a8966c254)\u001b[0m\n",
441-
"\n",
442-
"Targeted region \u001b[36;1mus-south\u001b[0m\n",
443-
"\n",
444-
"\u001b[1m\u001b[0m \u001b[1m\u001b[0m \n",
445-
"\u001b[36;1mAPI endpoint:\u001b[0m \u001b[36;1mhttps://cloud.ibm.com\u001b[0m \n",
446-
"\u001b[36;1mRegion:\u001b[0m \u001b[36;1mus-south\u001b[0m \n",
447-
"\u001b[36;1mUser:\u001b[0m \u001b[36;[email protected]\u001b[0m \n",
448-
"\u001b[36;1mAccount:\u001b[0m \u001b[36;1mRomeo Kienzler's Account (4b5f219cdaee498f9dac672a8966c254)\u001b[0m \n",
449-
"\u001b[36;1mResource group:\u001b[0m No resource group targeted, use '\u001b[33;1m./IBM_Cloud_CLI/ibmcloud target -g RESOURCE_GROUP\u001b[0m' \n",
450-
"\u001b[36;1mCF API endpoint:\u001b[0m \n",
451-
"\u001b[36;1mOrg:\u001b[0m \u001b[36;1m\u001b[0m \n",
452-
"\u001b[36;1mSpace:\u001b[0m \u001b[36;1m\u001b[0m \n",
453-
"Targeted Cloud Foundry (\u001b[36;1mhttps://api.us-south.cf.cloud.ibm.com\u001b[0m)\n",
454-
"\n",
455-
"Targeted org \u001b[36;[email protected]\u001b[0m\n",
456-
"\n",
457-
"Targeted space \u001b[36;1mdev\u001b[0m\n",
458-
"\n",
459-
"\n",
460-
"\u001b[1m\u001b[0m \u001b[1m\u001b[0m \n",
461-
"\u001b[36;1mAPI endpoint:\u001b[0m \u001b[36;1mhttps://cloud.ibm.com\u001b[0m \n",
462-
"\u001b[36;1mRegion:\u001b[0m \u001b[36;1mus-south\u001b[0m \n",
463-
"\u001b[36;1mUser:\u001b[0m \u001b[36;[email protected]\u001b[0m \n",
464-
"\u001b[36;1mAccount:\u001b[0m \u001b[36;1mRomeo Kienzler's Account (4b5f219cdaee498f9dac672a8966c254)\u001b[0m \n",
465-
"\u001b[36;1mResource group:\u001b[0m No resource group targeted, use '\u001b[33;1m./IBM_Cloud_CLI/ibmcloud target -g RESOURCE_GROUP\u001b[0m' \n",
466-
"\u001b[36;1mCF API endpoint:\u001b[0m \u001b[36;1mhttps://api.us-south.cf.cloud.ibm.com\u001b[0m (API version: \u001b[36;1m2.146.0\u001b[0m) \n",
467-
"\u001b[36;1mOrg:\u001b[0m \u001b[36;[email protected]\u001b[0m \n",
468-
"\u001b[36;1mSpace:\u001b[0m \u001b[36;1mdev\u001b[0m \n"
469-
]
470-
}
471-
],
371+
"execution_count": null,
372+
"metadata": {},
373+
"outputs": [],
472374
"source": [
473375
"!./IBM_Cloud_CLI/ibmcloud login --apikey `cat apikey` -c `cat account` -r `cat region`\n",
474376
"!./IBM_Cloud_CLI/ibmcloud target -o `cat organization` -s `cat space`"
@@ -494,44 +396,18 @@
494396
},
495397
{
496398
"cell_type": "code",
497-
"execution_count": 39,
498-
"metadata": {},
499-
"outputs": [
500-
{
501-
"name": "stdout",
502-
"output_type": "stream",
503-
"text": [
504-
"================================================\r\n",
505-
"Fetching instances list for Prod \r\n",
506-
"================================================\r\n",
507-
"SI No GUID Instance Name \r\n",
508-
"================================================\r\n",
509-
"Fetching instances list for Prod successful\r\n",
510-
"================================================\r\n",
511-
"\r\n",
512-
"0 records found.\r\n",
513-
"OK\r\n",
514-
"List Instances successful\r\n"
515-
]
516-
}
517-
],
399+
"execution_count": null,
400+
"metadata": {},
401+
"outputs": [],
518402
"source": [
519403
"!./IBM_Cloud_CLI/ibmcloud ml list instances | tee out"
520404
]
521405
},
522406
{
523407
"cell_type": "code",
524-
"execution_count": 40,
525-
"metadata": {},
526-
"outputs": [
527-
{
528-
"name": "stdout",
529-
"output_type": "stream",
530-
"text": [
531-
"Didn't find a Watson Machine Learning instance in your cloud account, please add using this link: https://cloud.ibm.com/catalog/services/machine-learning\n"
532-
]
533-
}
534-
],
408+
"execution_count": null,
409+
"metadata": {},
410+
"outputs": [],
535411
"source": [
536412
"%%bash\n",
537413
"found_instance=`cat out |grep \"1 records found\" |wc -l`\n",
@@ -553,22 +429,9 @@
553429
},
554430
{
555431
"cell_type": "code",
556-
"execution_count": 41,
557-
"metadata": {},
558-
"outputs": [
559-
{
560-
"name": "stdout",
561-
"output_type": "stream",
562-
"text": [
563-
"================================================\r\n",
564-
"Instance-ID:\tea4e01b9-9671-4445-8b49-d5d6404f48eb\r\n",
565-
"URL: \t\thttps://us-south.ml.cloud.ibm.com\r\n",
566-
"================================================\r\n",
567-
"\u001b[32;1mOK\u001b[0m\r\n",
568-
"Set Instance successful\r\n"
569-
]
570-
}
571-
],
432+
"execution_count": null,
433+
"metadata": {},
434+
"outputs": [],
572435
"source": [
573436
"!./IBM_Cloud_CLI/ibmcloud ml set instance `cat instance_guid`"
574437
]
@@ -582,7 +445,7 @@
582445
},
583446
{
584447
"cell_type": "code",
585-
"execution_count": 42,
448+
"execution_count": null,
586449
"metadata": {},
587450
"outputs": [],
588451
"source": [
@@ -644,20 +507,9 @@
644507
},
645508
{
646509
"cell_type": "code",
647-
"execution_count": 44,
648-
"metadata": {},
649-
"outputs": [
650-
{
651-
"name": "stdout",
652-
"output_type": "stream",
653-
"text": [
654-
"Starting to train ...\n",
655-
"ff9b0686-9cb4-4301-b888-89fcb6926918 c3d52713-7ece-4838-9af0-f9438c9d1f44\n",
656-
"\u001b[32;1mOK\u001b[0m\n",
657-
"Model-ID is '\u001b[36;1mmodel-ypn5orci\u001b[0m'\n"
658-
]
659-
}
660-
],
510+
"execution_count": null,
511+
"metadata": {},
512+
"outputs": [],
661513
"source": [
662514
"!./IBM_Cloud_CLI/ibmcloud ml train keras-model.zip tf-train.yaml"
663515
]
@@ -671,52 +523,9 @@
671523
},
672524
{
673525
"cell_type": "code",
674-
"execution_count": 51,
675-
"metadata": {},
676-
"outputs": [
677-
{
678-
"name": "stdout",
679-
"output_type": "stream",
680-
"text": [
681-
"Fetching the list of training runs ...\n",
682-
"\u001b[1mSI No\u001b[0m \u001b[1mName\u001b[0m \u001b[1mguid\u001b[0m \u001b[1mstatus\u001b[0m \u001b[1mframework\u001b[0m \u001b[1mversion\u001b[0m \u001b[1msubmitted-at\u001b[0m \n",
683-
"\u001b[36;1m1\u001b[0m python-client-tutorial_training-run model-n0n497y6 error tensorflow 1.15.0 2020-03-27T17:48:23.784Z \n",
684-
"\u001b[36;1m2\u001b[0m python-client-tutorial_training-run model-m4aw2ghj error tensorflow 1.15 2020-03-27T17:48:46.182Z \n",
685-
"\u001b[36;1m3\u001b[0m python-client-tutorial_training-run model-fcsy6b08 error tensorflow 1.15 2020-03-27T17:49:52.578Z \n",
686-
"\u001b[36;1m4\u001b[0m python-client-tutorial_training-run model-8bnjhld9 error tensorflow 1.15 2020-03-27T18:49:26.798Z \n",
687-
"\u001b[36;1m5\u001b[0m python-client-tutorial_training-run model-4dqcc9p1 error tensorflow 1.15 2020-03-27T18:50:24.287Z \n",
688-
"\u001b[36;1m6\u001b[0m python-client-tutorial_training-run model-nraip4h4 error tensorflow 1.15 2020-03-27T18:58:50.160Z \n",
689-
"\u001b[36;1m7\u001b[0m python-client-tutorial_training-run model-k9rxql7f error tensorflow 1.15 2020-03-27T19:02:29.666Z \n",
690-
"\u001b[36;1m8\u001b[0m python-client-tutorial_training-run model-p3gcq1pp error tensorflow 1.15 2020-03-27T19:03:27.272Z \n",
691-
"\u001b[36;1m9\u001b[0m tf-mnist-showtest1 model-ad8w26rh completed tensorflow 1.15 2020-03-27T20:51:36.514Z \n",
692-
"\u001b[36;1m10\u001b[0m tf-mnist-showtest1 model-h6x48qze error tensorflow 1.15 2020-03-31T07:36:11.208Z \n",
693-
"\u001b[36;1m11\u001b[0m tf-mnist-showtest1 model-k5az8790 error tensorflow 1.15 2020-03-31T07:36:48.122Z \n",
694-
"\u001b[36;1m12\u001b[0m tf-mnist-showtest1 model-mqn0kf04 completed tensorflow 1.15 2020-03-31T07:37:33.015Z \n",
695-
"\u001b[36;1m13\u001b[0m tf-mnist-showtest1 model-570gb3dx completed tensorflow 1.15 2020-03-31T07:54:23.406Z \n",
696-
"\u001b[36;1m14\u001b[0m tf-mnist-showtest1 model-kalng3py error tensorflow 1.15 2020-04-01T14:05:30.041Z \n",
697-
"\u001b[36;1m15\u001b[0m tf-mnist-showtest1 model-zswqjcne error tensorflow 1.15 2020-04-01T14:10:06.795Z \n",
698-
"\u001b[36;1m16\u001b[0m tf-mnist-showtest1 model-by154g9c error tensorflow 1.15 2020-04-01T14:22:39.750Z \n",
699-
"\u001b[36;1m17\u001b[0m tf-mnist-showtest1 model-0sws9b80 error tensorflow 1.15 2020-04-01T14:30:38.879Z \n",
700-
"\u001b[36;1m18\u001b[0m tf-mnist-showtest1 model-wswornig error tensorflow 1.15 2020-04-01T14:31:51.844Z \n",
701-
"\u001b[36;1m19\u001b[0m tf-mnist-showtest1 model-wa5mwgyl error tensorflow 1.15 2020-04-01T14:47:25.865Z \n",
702-
"\u001b[36;1m20\u001b[0m tf-mnist-showtest1 model-eed39wrm completed tensorflow 1.15 2020-04-01T14:57:37.665Z \n",
703-
"\u001b[36;1m21\u001b[0m tf-mnist-showtest1 model-w1kheyx9 completed tensorflow 1.15 2020-04-01T15:02:40.904Z \n",
704-
"\u001b[36;1m22\u001b[0m tf-mnist-showtest1 model-qnwnzfh4 completed tensorflow 1.15 2020-04-01T15:06:02.695Z \n",
705-
"\u001b[36;1m23\u001b[0m tf-mnist-showtest1 model-ssp6a9b8 completed tensorflow 1.15 2020-04-02T05:50:27.705Z \n",
706-
"\u001b[36;1m24\u001b[0m tf-mnist-showtest1 model-5hs8wm52 completed tensorflow 1.15 2020-04-02T06:00:34.350Z \n",
707-
"\u001b[36;1m25\u001b[0m tf-mnist-showtest1 model-x0x6gqq2 completed tensorflow 1.15 2020-04-02T06:10:47.777Z \n",
708-
"\u001b[36;1m26\u001b[0m tf-mnist-showtest1 model-7p7qzwhm completed tensorflow 1.15 2020-04-02T06:35:10.948Z \n",
709-
"\u001b[36;1m27\u001b[0m tf-mnist-showtest1 model-281p8zh5 completed tensorflow 1.15 2020-04-02T06:57:40.421Z \n",
710-
"\u001b[36;1m28\u001b[0m tf-mnist-showtest1 model-ow20pkpp completed tensorflow 1.15 2020-04-02T07:02:13.968Z \n",
711-
"\u001b[36;1m29\u001b[0m tf-mnist-showtest1 model-rahhm2cf pending tensorflow 1.15 2020-04-03T14:26:31.463Z \n",
712-
"\u001b[36;1m30\u001b[0m tf-mnist-showtest1 model-ypn5orci pending tensorflow 1.15 2020-04-03T14:54:54.584Z \n",
713-
"\n",
714-
"30 records found.\n",
715-
"\u001b[32;1mOK\u001b[0m\n",
716-
"List all training-runs successful\n"
717-
]
718-
}
719-
],
526+
"execution_count": null,
527+
"metadata": {},
528+
"outputs": [],
720529
"source": [
721530
"!./IBM_Cloud_CLI/ibmcloud ml list training-runs"
722531
]

0 commit comments

Comments
 (0)