We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c4eb1f5 commit a86772eCopy full SHA for a86772e
src/thread/thread.py
@@ -387,6 +387,7 @@ def _wrap_function(self, function: TargetFunction) -> TargetFunction:
387
@wraps(function)
388
def wrapper(
389
index: int,
390
+ length: int,
391
data_chunk: Generator[_Dataset_T, None, None],
392
*args: _Target_P.args,
393
**kwargs: _Target_P.kwargs,
@@ -397,7 +398,7 @@ def wrapper(
397
398
for data_entry in data_chunk:
399
v = function(data_entry, *args, **kwargs)
400
computed.append(v)
- self._threads[index].progress = round((i + 1) / len(data_chunk), 5)
401
+ self._threads[index].progress = round((i + 1) / length, 5)
402
i += 1
403
404
self._completed += 1
0 commit comments