Skip to content

Commit 92b720c

Browse files
authored
Merge pull request #60 from FranklinChen/pickling
Deal with the pickling stuff
2 parents b0da8eb + fd063bd commit 92b720c

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

batchalign/cli/dispatch.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,22 @@ def _dispatch(command, lang, num_speakers,
311311
**kwargs):
312312

313313
C = console
314+
worker_handled = {
315+
"align",
316+
"transcribe",
317+
"transcribe_s",
318+
"translate",
319+
"morphotag",
320+
"utseg",
321+
"coref",
322+
"benchmark",
323+
"opensmile",
324+
}
325+
if command in worker_handled:
326+
# Avoid pickling CLI-local loader/writer functions when the worker
327+
# implements the command-specific IO logic.
328+
loader = None
329+
writer = None
314330
from batchalign.constants import FORCED_CONVERSION
315331
from batchalign.document import TaskFriendlyName
316332

0 commit comments

Comments
 (0)