Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
miili committed Nov 7, 2023
1 parent b26e1b9 commit 2a5cd7b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lassie/images/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@ async def worker() -> None:
"start pre-processing images, queue size %d", self._queue.maxsize
)
async for batch in batch_iterator:
start_time = datetime_now()
images = await self.process_traces(batch.traces)
stats.time_per_batch = datetime_now() - start_time
if self._queue.empty() and self._processed_images:
logger.warning("image queue ran empty, processing is slow")
self._processed_images += 1
Expand All @@ -98,9 +100,7 @@ async def worker() -> None:

while True:
stats.queue_size = self._queue.qsize()
start_time = datetime_now()
ret = await self._queue.get()
stats.time_per_batch = datetime_now() - start_time
if ret is None:
logger.debug("image function finished")
break
Expand Down
2 changes: 1 addition & 1 deletion lassie/tracers/cake.py
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ def _interpolate_travel_times(
traveltimes.append(self._interpolate_traveltimes_sptree(coords))
PROGRESS.update(status, advance=1)

PROGRESS.remove_task()
PROGRESS.remove_task(status)

return np.asarray(traveltimes).astype(float)

Expand Down

0 comments on commit 2a5cd7b

Please sign in to comment.