Просмотр исходного кода

changed default multi-job method to processes... Multi-threaded iterator is buggy

Dimitri Korsch 2 лет назад
Родитель
Сommit
3af6aa1fa1
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      cvdatasets/utils/dataset.py

+ 2 - 1
cvdatasets/utils/dataset.py

@@ -12,7 +12,7 @@ def _uuid_check(uuids):
 		"UUIDs are not unique!"
 
 def new_iterator(data, n_jobs, batch_size, repeat=True, shuffle=True, n_prefetch=2, *,
-	use_threads: bool = True):
+	use_threads: bool = False):
 	from chainer.iterators import SerialIterator, MultiprocessIterator, MultithreadIterator
 
 	it_kwargs = dict(batch_size=batch_size, repeat=repeat, shuffle=shuffle)
@@ -24,6 +24,7 @@ def new_iterator(data, n_jobs, batch_size, repeat=True, shuffle=True, n_prefetch
 			pass
 
 		if use_threads:
+			raise RuntimeError("MultithreadIterator seems to have some issues concerning configs")
 			it_cls = MultithreadIterator
 			it_kwargs["n_threads"] = n_jobs