§
    “©ºjñ  ã                   ó`   — d Z ddlmZ ddlmZ ddlmZmZ eddeded         fd	„¦   «         Z	d
S )z1Utilities to help with reproducibility of models.é    )Ú	Generator)Úcontextmanager©Ú_collect_rng_statesÚ_set_rng_statesTÚinclude_cudaÚreturn)NNNc              #   óN   K  — t          | ¦  «        }dV — t          |¦  «         dS )a  A context manager that resets the global random state on exit to what it was before entering.

    It supports isolating the states for PyTorch, Numpy, and Python built-in random number generators.

    Args:
        include_cuda: Whether to allow this function to also control the `torch.cuda` random number generator.
            Set this to ``False`` when using the function in a forked process where CUDA re-initialization is
            prohibited.

    Example:
        >>> import torch
        >>> torch.manual_seed(1)  # doctest: +ELLIPSIS
        <torch._C.Generator object at ...>
        >>> with isolate_rng():
        ...     [torch.rand(1) for _ in range(3)]
        [tensor([0.7576]), tensor([0.2793]), tensor([0.4031])]
        >>> torch.rand(1)
        tensor([0.7576])

    Nr   )r   Ústatess     úp/root/private/project/pallet_detection_v2/.venv/lib/python3.11/site-packages/pytorch_lightning/utilities/seed.pyÚisolate_rngr      s2   è è € õ, ! Ñ.Ô.€FØ	€E€E€EÝ�FÑÔÐÐÐó    N)T)
Ú__doc__Úcollections.abcr   Ú
contextlibr   Úlightning_fabric.utilities.seedr   r   Úboolr   © r   r   ú<module>r      sŒ   ðð 8Ð 7à %Ð %Ð %Ð %Ð %Ð %Ø %Ð %Ð %Ð %Ð %Ð %à PÐ PÐ PÐ PÐ PÐ PÐ PÐ Pð ðð ˜dð ¨iÐ8HÔ.Ið ð ð ñ „ðð ð r   