From 65beec521469f2160f07e2eec09843fd0569c9eb Mon Sep 17 00:00:00 2001 From: miili Date: Sun, 5 Nov 2023 19:11:28 +0100 Subject: [PATCH] fixes --- lassie/images/__init__.py | 2 +- lassie/images/phase_net.py | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/lassie/images/__init__.py b/lassie/images/__init__.py index c6139409..ae3080e1 100644 --- a/lassie/images/__init__.py +++ b/lassie/images/__init__.py @@ -78,7 +78,7 @@ async def worker() -> None: async for batch in batch_iterator: images = await self.process_traces(batch.traces) if self._queue.empty() and self._processed_images: - logger.warning("image queue ran empty, prefetching is too slow") + logger.warning("image queue ran empty, processing is slow") self._processed_images += 1 await self._queue.put((images, batch)) diff --git a/lassie/images/phase_net.py b/lassie/images/phase_net.py index 5fb108b7..7e6a28ef 100644 --- a/lassie/images/phase_net.py +++ b/lassie/images/phase_net.py @@ -1,6 +1,5 @@ from __future__ import annotations -import asyncio import logging from datetime import datetime, timedelta from typing import TYPE_CHECKING, Any, Literal @@ -163,8 +162,7 @@ async def process_traces(self, traces: list[Trace]) -> list[PhaseNetImage]: for tr in stream: tr.stats.sampling_rate = tr.stats.sampling_rate / scale - annotations: Stream = await asyncio.to_thread( - self._phase_net.annotate, + annotations: Stream = await self._phase_net.annotate_async( stream, overlap=self.window_overlap_samples, batch_size=self.batch_size