Skip to content
Snippets Groups Projects

[LPD] [Dark] Don't use multiprocessing inside multiprocessing when opening run

Merged Thomas Kluyver requested to merge fix/lpd-dark-daemon-children into master
1 file
+ 5
1
Compare changes
  • Side-by-side
  • Inline
@@ -183,14 +183,18 @@
"\n",
"# the actual characterization\n",
"def characterize_module(run_path, channel, gg):\n",
" run = RunDirectory(run_path)\n",
" run = RunDirectory(run_path, parallelize=False)\n",
" det_source = source_name.format(karabo_id, channel)\n",
" data = run[det_source, 'image.data'].drop_empty_trains()\n",
" data = data[skip_first_ntrains : skip_first_ntrains + ntrains]\n",
" cell_ids = run[det_source, 'image.cellId'].drop_empty_trains()\n",
" cell_ids = cell_ids[skip_first_ntrains : skip_first_ntrains + ntrains]\n",
" \n",
" if len(data.train_ids) < min_trains:\n",
"\n",
" # If there is no data available, return and expect this\n",
" # module to be skipped later.\n",
" if len(data.train_ids) == 0:\n",
" return None, None, None, None, None, None, None, None\n",
" elif len(data.train_ids) < min_trains:\n",
" raise Exception(f\"Run {run_path} only contains {len(data.train_ids)} trains, but {min_trains} required\")\n",
"\n",
" im = data.ndarray()\n",
Loading