Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
miili committed Nov 5, 2023
1 parent 4ad0440 commit 65beec5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lassie/images/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down
4 changes: 1 addition & 3 deletions lassie/images/phase_net.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from __future__ import annotations

import asyncio
import logging
from datetime import datetime, timedelta
from typing import TYPE_CHECKING, Any, Literal
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 65beec5

Please sign in to comment.