o
    ziW                  '   @   s  d dl mZmZmZmZ d dlmZ d dlmZ	 d dl
mZ d dlmZ d dlmZ d dlmZ edZd d	d	d	d
d
d	d
d
d
d
d
d
d
d
d
ddedee dee dee dededee dedededededededededeee eeef f f"ddZd	S )    )DictListOptionalTuple)RequirementCache)_runif_reasons)_PSUTIL_AVAILABLE)_RICH_AVAILABLE)_ONNX_AVAILABLE)_OMEGACONF_AVAILABLEscikit-learnNF)min_cuda_gpus	min_torch	max_torch
min_python	bf16_cudatpumpsskip_windows
standalone	deepspeeddynamorich	omegaconfpsutilsklearnonnxr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   returnc                 C   s   t | |||||||||	|
d\}}|rts|d |r#ts#|d |r,ts,|d |r5ts5|d |r>ts>|d ||fS )a  Construct reasons for pytest skipif.

    Args:
        min_cuda_gpus: Require this number of gpus and that the ``PL_RUN_CUDA_TESTS=1`` environment variable is set.
        min_torch: Require that PyTorch is greater or equal than this version.
        max_torch: Require that PyTorch is less than this version.
        min_python: Require that Python is greater or equal than this version.
        bf16_cuda: Require that CUDA device supports bf16.
        tpu: Require that TPU is available.
        mps: If True: Require that MPS (Apple Silicon) is available,
            if False: Explicitly Require that MPS is not available
        skip_windows: Skip for Windows platform.
        standalone: Mark the test as standalone, our CI will run it in a separate process.
            This requires that the ``PL_RUN_STANDALONE_TESTS=1`` environment variable is set.
        deepspeed: Require that microsoft/DeepSpeed is installed.
        dynamo: Require that `torch.dynamo` is supported.
        rich: Require that willmcgugan/rich is installed.
        omegaconf: Require that omry/omegaconf is installed.
        psutil: Require that psutil is installed.
        sklearn: Require that scikit-learn is installed.
        onnx: Require that onnx is installed.

    )r   r   r   r   r   r   r   r   r   r   r   Richr   r   r   r   )fabric_run_ifr	   appendr   r   _SKLEARN_AVAILABLEr
   )r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   reasonskwargs r$   ^/home/ubuntu/.local/lib/python3.10/site-packages/pytorch_lightning/utilities/testing/_runif.pyr      s0   +





r   )typingr   r   r   r    lightning_utilities.core.importsr   "lightning_fabric.utilities.testingr   r   "pytorch_lightning.accelerators.cpur   2pytorch_lightning.callbacks.progress.rich_progressr	   pytorch_lightning.core.moduler
   #pytorch_lightning.utilities.importsr   r!   intstrboolr$   r$   r$   r%   <module>   sv   	
