INNER CODE UNIT · Python

DataInspectRequest

MakazhanAlpamys/Soup · src/soup_cli/ui/app.py:194

class DataInspectRequest(PydanticBaseModel):
    """Request body for data inspection."""
    path: str
    limit: int = Field(default=50, ge=1, le=_MAX_INSPECT_LIMIT)


class TrainLogBuffer:
    """Thread-safe bounded ring buffer for subprocess output lines."""

    def __init__(self, maxlen: int = 10000):
        self._maxlen = maxlen
        self._lines: list[tuple[int, str]] = []
        self._lock = threading.Lock()
        self._new_line_cond = threading.Condition(self._lock)
        self._done = False
        self._total_emitted = 0

    def append(self, text: str) -> None:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…