# This file is automatically generated by pyo3_stub_gen
# ruff: noqa: E501, F401, F403, F405
r"""
Pipeline execution entry point.
"""

import builtins
import collections.abc
import raygeo
from raygeo.pipeline import completed
from raygeo.pipeline import request
import typing
__all__ = [
    "Pipeline",
    "clear_cache",
    "execute_stages",
]

@typing.final
class Pipeline:
    @property
    def cache_used_bytes(self) -> builtins.int:
        r"""
        Current bytes in use by the cache.
        """
    @property
    def cache_budget_bytes(self) -> builtins.int:
        r"""
        Configured byte budget.
        """
    def __new__(cls, budget_bytes: builtins.int = 268435456) -> Pipeline:
        r"""
        Construct a pipeline with the given cache byte budget
        (default 256 MiB).
        """
    def execute(self, nodes: typing.Sequence[request.NodeRequest], on_completed: typing.Any, on_batch_progress: typing.Optional[typing.Any]) -> None:
        r"""
        Run all nodes in a single ``rayon::scope``.
        
        :param nodes: List of
            :class:`~raygeo.pipeline.request.NodeRequest` instances.
        :param on_completed: Callable ``(node: CompletedNode) -> None``
            fired for every node.
        :param on_batch_progress: Optional callable
            ``(fraction: float, message: str) -> None``.
        """
    def clear_cache(self) -> None:
        r"""
        Clear the entire cache.
        """
    def clear_cache_prefix(self, prefix: builtins.str) -> None:
        r"""
        Clear all entries whose tag starts with ``prefix``.
        """

def clear_cache() -> None: ...

def execute_stages(nodes: list[raygeo.pipeline.request.NodeRequest], on_completed: collections.abc.Callable[[raygeo.pipeline.completed.CompletedNode], None], on_batch_progress: collections.abc.Callable[[float, str], None] | None = None) -> None:
    r"""
    Run all nodes in a single rayon::scope.
    
    Fires ``on_completed`` for every node (success, failure, or
    cancellation) with a :class:`CompletedNode` carrying the
    node's ``key``, ``generation_id``, and either ``output`` or
    ``error``. ``on_batch_progress`` (optional) fires with the
    aggregate fraction and a status message on every per-node
    progress report and every completion.
    """

