Spaces:
Running
Running
Download src/lib/tracing/subscribers.py from Leon4gr45/brain: direct link, hf CLI and curl.
- Browser
- Download file 404 Bytes
-
https://huggingface.co/spaces/Leon4gr45/brain/resolve/main/src/lib/tracing/subscribers.py
- Command line
-
hf download hf://spaces/Leon4gr45/brain/src/lib/tracing/subscribers.py
-
curl -L -o subscribers.py https://huggingface.co/spaces/Leon4gr45/brain/resolve/main/src/lib/tracing/subscribers.py
404 Bytes
| from abc import ABC, abstractmethod | |
| from typing import Iterable | |
| from src.lib.tracing.events import TraceEvent | |
| class TraceSubscriber(ABC): | |
| def handle(self, event: TraceEvent) -> None: | |
| raise NotImplementedError("handle method not implemented") | |
| def handle_many(self, events: Iterable[TraceEvent]) -> None: | |
| for event in events: | |
| self.handle(event) | |