
    ^jM                     2    d Z ddlZddlZddlZddeddfdZy)z4Reproducibility helpers: seed all RNGs consistently.    Nseedreturnc                    t        j                  |        t        j                   j                  |        t        j                  |        t        j
                  j                         r^t        j
                  j                  |        dt        j                  j                  _
        dt        j                  j                  _        yy)a  Seed all random number generators for reproducibility.

    Sets seeds for Python's ``random`` module, NumPy, and PyTorch (CPU and all CUDA devices).  Also configures cuDNN to
    use deterministic algorithms and disables its auto-tuner so that results are reproducible across runs at the cost of
    a possible slight performance decrease.

    Args:
        seed: Integer seed value.  Defaults to ``7``.
    TFN)randomr   nptorchmanual_seedcudais_availablemanual_seed_allbackendscudnndeterministic	benchmark)r   s    k/var/www/ramen.bs-engineer-server.com/venv/lib/python3.12/site-packages/rfdetr/utilities/reproducibility.pyseed_allr      sy     KKIINN4	dzz 

""4(-1*).& !    )   )__doc__r   numpyr   r   intr    r   r   <module>r      s&    ;   /3 /t /r   