File size: 867 Bytes
9c6594c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
"""InterfaceRelay - Derived from InterfaceQueue using RelayRouter to preserve uuid req/resp.
See interface.py for how interface classes relate to each other.
"""
from __future__ import annotations
import logging
from typing import TYPE_CHECKING
from wandb.proto import wandb_internal_pb2 as pb
from wandb.sdk.mailbox import Mailbox
from .interface_queue import InterfaceQueue
if TYPE_CHECKING:
from queue import Queue
logger = logging.getLogger("wandb")
class InterfaceRelay(InterfaceQueue):
_mailbox: Mailbox
def __init__(
self,
mailbox: Mailbox,
record_q: Queue[pb.Record],
result_q: Queue[pb.Result],
relay_q: Queue[pb.Result],
) -> None:
self.relay_q = relay_q
super().__init__(
record_q=record_q,
result_q=result_q,
mailbox=mailbox,
)
|