From 93a7478e4efe737e0daf59e22d875c5cf47040e3 Mon Sep 17 00:00:00 2001 From: Alexey Zaytsev Date: Tue, 14 Feb 2023 20:29:25 +0700 Subject: [PATCH] Don't reuse processes between notebooks --- nbdev/test.py | 3 ++- nbs/api/12_test.ipynb | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/nbdev/test.py b/nbdev/test.py index d1e508b9a..2378e5b9f 100644 --- a/nbdev/test.py +++ b/nbdev/test.py @@ -87,7 +87,8 @@ def nbdev_test( else: kw = {} with working_directory(get_config().nbs_path): results = parallel(test_nb, files, skip_flags=skip_flags, force_flags=force_flags, n_workers=n_workers, - basepath=get_config().config_path, pause=pause, do_print=do_print, **kw) + basepath=get_config().config_path, pause=pause, do_print=do_print, + executor=False, maxtasksperchild=1, **kw) passed,times = zip(*results) if all(passed): print("Success.") else: diff --git a/nbs/api/12_test.ipynb b/nbs/api/12_test.ipynb index 838b73908..afdd5b645 100644 --- a/nbs/api/12_test.ipynb +++ b/nbs/api/12_test.ipynb @@ -183,7 +183,8 @@ " else: kw = {}\n", " with working_directory(get_config().nbs_path):\n", " results = parallel(test_nb, files, skip_flags=skip_flags, force_flags=force_flags, n_workers=n_workers,\n", - " basepath=get_config().config_path, pause=pause, do_print=do_print, **kw)\n", + " basepath=get_config().config_path, pause=pause, do_print=do_print,\n", + " executor=False, maxtasksperchild=1, **kw)\n", " passed,times = zip(*results)\n", " if all(passed): print(\"Success.\")\n", " else: \n",