Skip to content

Commit 9ba8515

Browse files
committed
don't plot anything in notebook
1 parent 5de31c3 commit 9ba8515

1 file changed

Lines changed: 38 additions & 24 deletions

File tree

examples/OpenMLDemo.ipynb

Lines changed: 38 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
},
7474
{
7575
"cell_type": "code",
76-
"execution_count": 10,
76+
"execution_count": 2,
7777
"metadata": {
7878
"collapsed": false
7979
},
@@ -107,7 +107,7 @@
107107
},
108108
{
109109
"cell_type": "code",
110-
"execution_count": 11,
110+
"execution_count": 3,
111111
"metadata": {
112112
"collapsed": false
113113
},
@@ -116,7 +116,7 @@
116116
"name": "stdout",
117117
"output_type": "stream",
118118
"text": [
119-
"First 10 of 3307 datasets...\n",
119+
"First 10 of 3335 datasets...\n",
120120
" did name NumberOfInstances NumberOfFeatures\n",
121121
"0 1 anneal 898 39\n",
122122
"1 2 anneal 898 39\n",
@@ -148,7 +148,7 @@
148148
},
149149
{
150150
"cell_type": "code",
151-
"execution_count": 12,
151+
"execution_count": 4,
152152
"metadata": {
153153
"collapsed": false
154154
},
@@ -187,7 +187,7 @@
187187
},
188188
{
189189
"cell_type": "code",
190-
"execution_count": 13,
190+
"execution_count": 5,
191191
"metadata": {
192192
"collapsed": false
193193
},
@@ -227,7 +227,7 @@
227227
},
228228
{
229229
"cell_type": "code",
230-
"execution_count": 14,
230+
"execution_count": 6,
231231
"metadata": {
232232
"collapsed": false
233233
},
@@ -257,7 +257,7 @@
257257
},
258258
{
259259
"cell_type": "code",
260-
"execution_count": 15,
260+
"execution_count": 7,
261261
"metadata": {
262262
"collapsed": false
263263
},
@@ -335,7 +335,7 @@
335335
},
336336
{
337337
"cell_type": "code",
338-
"execution_count": 16,
338+
"execution_count": 8,
339339
"metadata": {
340340
"collapsed": false
341341
},
@@ -374,13 +374,13 @@
374374
},
375375
{
376376
"cell_type": "code",
377-
"execution_count": 17,
377+
"execution_count": 9,
378378
"metadata": {
379379
"collapsed": true
380380
},
381381
"outputs": [],
382382
"source": [
383-
"iris.plot(kind='scatter', x='petallength', y='petalwidth', c='class', s=50);"
383+
"# iris.plot(kind='scatter', x='petallength', y='petalwidth', c='class', s=50);"
384384
]
385385
},
386386
{
@@ -392,7 +392,7 @@
392392
},
393393
{
394394
"cell_type": "code",
395-
"execution_count": 18,
395+
"execution_count": 10,
396396
"metadata": {
397397
"collapsed": false
398398
},
@@ -408,7 +408,7 @@
408408
" warm_start=False)"
409409
]
410410
},
411-
"execution_count": 18,
411+
"execution_count": 10,
412412
"metadata": {},
413413
"output_type": "execute_result"
414414
}
@@ -422,7 +422,7 @@
422422
},
423423
{
424424
"cell_type": "code",
425-
"execution_count": 19,
425+
"execution_count": 11,
426426
"metadata": {
427427
"collapsed": true
428428
},
@@ -458,15 +458,15 @@
458458
},
459459
{
460460
"cell_type": "code",
461-
"execution_count": 20,
461+
"execution_count": 12,
462462
"metadata": {
463463
"collapsed": false
464464
},
465465
"outputs": [],
466466
"source": [
467467
"X_2d = X[:,2:4]\n",
468468
"clf.fit(X_2d, y)\n",
469-
"plot_surface(clf, X_2d, y)"
469+
"# plot_surface(clf, X_2d, y)"
470470
]
471471
},
472472
{
@@ -478,7 +478,7 @@
478478
},
479479
{
480480
"cell_type": "code",
481-
"execution_count": 21,
481+
"execution_count": 13,
482482
"metadata": {
483483
"collapsed": false
484484
},
@@ -494,7 +494,7 @@
494494
" warm_start=False)"
495495
]
496496
},
497-
"execution_count": 21,
497+
"execution_count": 13,
498498
"metadata": {},
499499
"output_type": "execute_result"
500500
}
@@ -529,11 +529,25 @@
529529
},
530530
{
531531
"cell_type": "code",
532-
"execution_count": null,
532+
"execution_count": 14,
533533
"metadata": {
534534
"collapsed": false
535535
},
536-
"outputs": [],
536+
"outputs": [
537+
{
538+
"ename": "TypeError",
539+
"evalue": "int() argument must be a string, a bytes-like object or a number, not 'NoneType'",
540+
"output_type": "error",
541+
"traceback": [
542+
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
543+
"\u001b[1;31mTypeError\u001b[0m Traceback (most recent call last)",
544+
"\u001b[1;32m<ipython-input-14-7653a7076e49>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mtask_list\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mopenml\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mtasks\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mlist_tasks\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 2\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 3\u001b[0m \u001b[0mtasks\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mpd\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mDataFrame\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mtask_list\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 4\u001b[0m \u001b[0mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m\"First 5 of %s tasks:\"\u001b[0m \u001b[1;33m%\u001b[0m \u001b[0mlen\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mtasks\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 5\u001b[0m \u001b[0mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mtasks\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;36m5\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;34m'tid'\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;34m'did'\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;34m'name'\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;34m'task_type'\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;34m'estimation_procedure'\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
545+
"\u001b[1;32m/home/andy/checkout/openml-python/openml/tasks/task_functions.py\u001b[0m in \u001b[0;36mlist_tasks\u001b[1;34m()\u001b[0m\n\u001b[0;32m 136\u001b[0m \u001b[0mthe\u001b[0m \u001b[0massociated\u001b[0m \u001b[0mdataset\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0msome\u001b[0m \u001b[0mof\u001b[0m \u001b[0mthese\u001b[0m \u001b[0mare\u001b[0m \u001b[0malso\u001b[0m \u001b[0mreturned\u001b[0m\u001b[1;33m.\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 137\u001b[0m \"\"\"\n\u001b[1;32m--> 138\u001b[1;33m \u001b[1;32mreturn\u001b[0m \u001b[0m_list_tasks\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'task/list'\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 139\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 140\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n",
546+
"\u001b[1;32m/home/andy/checkout/openml-python/openml/tasks/task_functions.py\u001b[0m in \u001b[0;36m_list_tasks\u001b[1;34m(api_call)\u001b[0m\n\u001b[0;32m 160\u001b[0m \u001b[0mproc_dict\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mdict\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mx\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;34m'id'\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mx\u001b[0m\u001b[1;33m)\u001b[0m \u001b[1;32mfor\u001b[0m \u001b[0mx\u001b[0m \u001b[1;32min\u001b[0m \u001b[0mprocs\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 161\u001b[0m \u001b[1;32mfor\u001b[0m \u001b[0mtask_\u001b[0m \u001b[1;32min\u001b[0m \u001b[0mtasks_dict\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;34m'oml:tasks'\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;34m'oml:task'\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 162\u001b[1;33m task = {'tid': int(task_['oml:task_id']),\n\u001b[0m\u001b[0;32m 163\u001b[0m \u001b[1;34m'did'\u001b[0m\u001b[1;33m:\u001b[0m \u001b[0mint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mtask_\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;34m'oml:did'\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 164\u001b[0m \u001b[1;34m'name'\u001b[0m\u001b[1;33m:\u001b[0m \u001b[0mtask_\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;34m'oml:name'\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
547+
"\u001b[1;31mTypeError\u001b[0m: int() argument must be a string, a bytes-like object or a number, not 'NoneType'"
548+
]
549+
}
550+
],
537551
"source": [
538552
"task_list = openml.tasks.list_tasks()\n",
539553
"\n",
@@ -551,7 +565,7 @@
551565
},
552566
{
553567
"cell_type": "code",
554-
"execution_count": 24,
568+
"execution_count": 15,
555569
"metadata": {
556570
"collapsed": false
557571
},
@@ -588,7 +602,7 @@
588602
},
589603
{
590604
"cell_type": "code",
591-
"execution_count": 25,
605+
"execution_count": 16,
592606
"metadata": {
593607
"collapsed": false
594608
},
@@ -619,7 +633,7 @@
619633
},
620634
{
621635
"cell_type": "code",
622-
"execution_count": 26,
636+
"execution_count": 17,
623637
"metadata": {
624638
"collapsed": false
625639
},
@@ -628,8 +642,8 @@
628642
"name": "stdout",
629643
"output_type": "stream",
630644
"text": [
631-
"Uploaded run with id 538148\n",
632-
"Check it at www.openml.org/r/538148\n"
645+
"Uploaded run with id 538163\n",
646+
"Check it at www.openml.org/r/538163\n"
633647
]
634648
}
635649
],

0 commit comments

Comments
 (0)