Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
dlwh committed Oct 4, 2024
1 parent 65bbf28 commit 04ce944
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/levanter/store/_prefetch_actor.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import asyncio
import logging
import time
from dataclasses import dataclass
from queue import Empty as QueueEmpty
from typing import Callable, Generic, Iterator, List, Optional, TypeVar
Expand Down Expand Up @@ -62,13 +61,13 @@ def get_next(self, timeout: float | None = None) -> T:
"""
if self._finished:
raise StopIteration
time_in = time.time()
# time_in = time.time()
item = ray.get(self.queue_actor.get_next.remote(timeout))
time_out = time.time()
if time_out - time_in > 0.1:
current_name = ray.get_runtime_context().get_actor_name()
print(f"{current_name} :: Queue get took {time_out - time_in} seconds :: {self.queue_size()}")
logger.info(f"{current_name} :: Queue get took {time_out - time_in} seconds :: {self.queue_size()}")
# time_out = time.time()
# if time_out - time_in > 0.1:
# current_name = ray.get_runtime_context().get_actor_name()
# print(f"{current_name} :: Queue get took {time_out - time_in} seconds :: {self.queue_size()}")
# logger.info(f"{current_name} :: Queue get took {time_out - time_in} seconds :: {self.queue_size()}")
if isinstance(item, _PrefetchException):
item.info.reraise()
if isinstance(item, _Sentinel):
Expand Down

0 comments on commit 04ce944

Please sign in to comment.