Skip to content

Commit 13a70b2

Browse files
authored
Merge pull request AnswerDotAI#636 from fastai/nit
rm `progress=False` from tests of `parallel` since that is the default
2 parents f4a05cf + 62a6b32 commit 13a70b2

File tree

1 file changed

+38
-15
lines changed

1 file changed

+38
-15
lines changed

nbs/03a_parallel.ipynb

+38-15
Original file line numberDiff line numberDiff line change
@@ -286,15 +286,26 @@
286286
"text/markdown": [
287287
"---\n",
288288
"\n",
289-
"### ThreadPoolExecutor\n",
289+
"[source](https://github.com/fastai/fastcore/blob/master/fastcore/parallel.py#L75){target=\"_blank\" style=\"float:right; font-size:smaller\"}\n",
290290
"\n",
291-
"> ThreadPoolExecutor (max_workers=8, on_exc=<built-infunctionprint>,\n",
291+
"#### ThreadPoolExecutor\n",
292+
"\n",
293+
"> ThreadPoolExecutor (max_workers=8, on_exc=<built-in function print>,\n",
292294
"> pause=0, **kwargs)\n",
293295
"\n",
294-
"Same as Python's ThreadPoolExecutor, except can pass `max_workers==0` for serial execution"
296+
"*Same as Python's ThreadPoolExecutor, except can pass `max_workers==0` for serial execution*"
295297
],
296298
"text/plain": [
297-
"<nbdev.showdoc.BasicMarkdownRenderer>"
299+
"---\n",
300+
"\n",
301+
"[source](https://github.com/fastai/fastcore/blob/master/fastcore/parallel.py#L75){target=\"_blank\" style=\"float:right; font-size:smaller\"}\n",
302+
"\n",
303+
"#### ThreadPoolExecutor\n",
304+
"\n",
305+
"> ThreadPoolExecutor (max_workers=8, on_exc=<built-in function print>,\n",
306+
"> pause=0, **kwargs)\n",
307+
"\n",
308+
"*Same as Python's ThreadPoolExecutor, except can pass `max_workers==0` for serial execution*"
298309
]
299310
},
300311
"execution_count": null,
@@ -346,16 +357,28 @@
346357
"text/markdown": [
347358
"---\n",
348359
"\n",
349-
"### ProcessPoolExecutor\n",
360+
"[source](https://github.com/fastai/fastcore/blob/master/fastcore/parallel.py#L94){target=\"_blank\" style=\"float:right; font-size:smaller\"}\n",
361+
"\n",
362+
"#### ProcessPoolExecutor\n",
350363
"\n",
351-
"> ProcessPoolExecutor (max_workers=8, on_exc=<built-infunctionprint>,\n",
364+
"> ProcessPoolExecutor (max_workers=8, on_exc=<built-in function print>,\n",
352365
"> pause=0, mp_context=None, initializer=None,\n",
353366
"> initargs=())\n",
354367
"\n",
355-
"Same as Python's ProcessPoolExecutor, except can pass `max_workers==0` for serial execution"
368+
"*Same as Python's ProcessPoolExecutor, except can pass `max_workers==0` for serial execution*"
356369
],
357370
"text/plain": [
358-
"<nbdev.showdoc.BasicMarkdownRenderer>"
371+
"---\n",
372+
"\n",
373+
"[source](https://github.com/fastai/fastcore/blob/master/fastcore/parallel.py#L94){target=\"_blank\" style=\"float:right; font-size:smaller\"}\n",
374+
"\n",
375+
"#### ProcessPoolExecutor\n",
376+
"\n",
377+
"> ProcessPoolExecutor (max_workers=8, on_exc=<built-in function print>,\n",
378+
"> pause=0, mp_context=None, initializer=None,\n",
379+
"> initargs=())\n",
380+
"\n",
381+
"*Same as Python's ProcessPoolExecutor, except can pass `max_workers==0` for serial execution*"
359382
]
360383
},
361384
"execution_count": null,
@@ -424,8 +447,8 @@
424447
"source": [
425448
"inp,exp = range(50),range(1,51)\n",
426449
"\n",
427-
"test_eq(parallel(add_one, inp, n_workers=2, progress=False), exp)\n",
428-
"test_eq(parallel(add_one, inp, threadpool=True, n_workers=2, progress=False), exp)\n",
450+
"test_eq(parallel(add_one, inp, n_workers=2), exp)\n",
451+
"test_eq(parallel(add_one, inp, threadpool=True, n_workers=2), exp)\n",
429452
"test_eq(parallel(add_one, inp, n_workers=1, a=2), range(2,52))\n",
430453
"test_eq(parallel(add_one, inp, n_workers=0), exp)\n",
431454
"test_eq(parallel(add_one, inp, n_workers=0, a=2), range(2,52))"
@@ -456,11 +479,11 @@
456479
"name": "stdout",
457480
"output_type": "stream",
458481
"text": [
459-
"0 2022-08-07 05:10:05.999916\n",
460-
"1 2022-08-07 05:10:06.252031\n",
461-
"2 2022-08-07 05:10:06.503603\n",
462-
"3 2022-08-07 05:10:06.755216\n",
463-
"4 2022-08-07 05:10:07.006702\n"
482+
"0 2024-10-09 16:08:39.462154\n",
483+
"1 2024-10-09 16:08:39.715074\n",
484+
"2 2024-10-09 16:08:39.969191\n",
485+
"3 2024-10-09 16:08:40.221442\n",
486+
"4 2024-10-09 16:08:40.473224\n"
464487
]
465488
}
466489
],

0 commit comments

Comments
 (0)