Skip to content

Commit e21a3a0

Browse files
author
Marcin Kardas
committed
Disable multiprocessing
1 parent c5dcee1 commit e21a3a0

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

sota_extractor2/models/linking/context_search.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,9 @@
138138
'LibriSpeech dev-other': ['libri speech dev other', 'libri speech', 'dev', 'other', 'dev other', 'development', 'noisy'],
139139
})
140140

141-
tasks = {}
141+
tasks = {
142+
'Speech Recognition': ['speech recognition']
143+
}
142144

143145
# escaped_ws_re = re.compile(r'\\\s+')
144146
# def name_to_re(name):

sota_extractor2/models/structure/ulmfit.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ def __init__(self, path, file, sp_path=None, sp_model="spm.model", sp_vocab="spm
88
self.learner = load_learner(path=path, file=file)
99
self._fix_sp_processor(sp_path, sp_model, sp_vocab)
1010

11+
# disable multiprocessing to avoid celery deamon issues
12+
for dl in self.learner.data.dls:
13+
dl.num_workers = 0
14+
1115
def _fix_sp_processor(self, sp_path, sp_model, sp_vocab):
1216
for processor in self.learner.data.label_list.valid.x.processor:
1317
if isinstance(processor, SPProcessor):

0 commit comments

Comments
 (0)