Explorar o código

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

Dimitri Korsch %!s(int64=2) %!d(string=hai) anos
pai
achega
3af6aa1fa1
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  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