Преглед изворни кода

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

Dimitri Korsch пре 2 година
родитељ
комит
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!"
 		"UUIDs are not unique!"
 
 
 def new_iterator(data, n_jobs, batch_size, repeat=True, shuffle=True, n_prefetch=2, *,
 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
 	from chainer.iterators import SerialIterator, MultiprocessIterator, MultithreadIterator
 
 
 	it_kwargs = dict(batch_size=batch_size, repeat=repeat, shuffle=shuffle)
 	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
 			pass
 
 
 		if use_threads:
 		if use_threads:
+			raise RuntimeError("MultithreadIterator seems to have some issues concerning configs")
 			it_cls = MultithreadIterator
 			it_cls = MultithreadIterator
 			it_kwargs["n_threads"] = n_jobs
 			it_kwargs["n_threads"] = n_jobs