######################################################################################################
#                                 Auto-generated Metaflow stub file                                  #
# MF version: 2.14.0                                                                                 #
# Generated on 2025-02-11T19:31:25.306334                                                            #
######################################################################################################

from __future__ import annotations

import metaflow
import typing
if typing.TYPE_CHECKING:
    import metaflow.exception

from ...exception import MetaflowException as MetaflowException
from .kube_utils import qos_requests_and_limits as qos_requests_and_limits

KUBERNETES_JOBSET_GROUP: str

KUBERNETES_JOBSET_VERSION: str

class KubernetesJobsetException(metaflow.exception.MetaflowException, metaclass=type):
    ...

def k8s_retry(deadline_seconds = 60, max_backoff = 32):
    ...

class JobsetStatus(tuple, metaclass=type):
    """
    JobsetStatus(control_pod_failed, control_exit_code, control_pod_status, control_started, control_completed, worker_pods_failed, workers_are_suspended, workers_have_started, all_jobs_are_suspended, jobset_finished, jobset_failed, status_unknown, jobset_was_terminated, some_jobs_are_running)
    """
    @staticmethod
    def __new__(_cls, control_pod_failed, control_exit_code, control_pod_status, control_started, control_completed, worker_pods_failed, workers_are_suspended, workers_have_started, all_jobs_are_suspended, jobset_finished, jobset_failed, status_unknown, jobset_was_terminated, some_jobs_are_running):
        """
        Create new instance of JobsetStatus(control_pod_failed, control_exit_code, control_pod_status, control_started, control_completed, worker_pods_failed, workers_are_suspended, workers_have_started, all_jobs_are_suspended, jobset_finished, jobset_failed, status_unknown, jobset_was_terminated, some_jobs_are_running)
        """
        ...
    def __repr__(self):
        """
        Return a nicely formatted representation string
        """
        ...
    def __getnewargs__(self):
        """
        Return self as a plain tuple.  Used by copy and pickle.
        """
        ...
    ...

class RunningJobSet(object, metaclass=type):
    def __init__(self, client, name, namespace, group, version):
        ...
    def __repr__(self):
        ...
    def kill(self):
        ...
    @property
    def id(self):
        ...
    @property
    def is_done(self):
        ...
    @property
    def status(self):
        ...
    @property
    def has_succeeded(self):
        ...
    @property
    def has_failed(self):
        ...
    @property
    def is_running(self):
        ...
    @property
    def _jobset_was_terminated(self):
        ...
    @property
    def is_waiting(self):
        ...
    @property
    def reason(self):
        ...
    @property
    def _jobset_is_completed(self):
        ...
    @property
    def _jobset_has_failed(self):
        ...
    ...

class JobSetSpec(object, metaclass=type):
    def __init__(self, kubernetes_sdk, name, **kwargs):
        ...
    def replicas(self, replicas):
        ...
    def step_name(self, step_name):
        ...
    def namespace(self, namespace):
        ...
    def command(self, command):
        ...
    def image(self, image):
        ...
    def cpu(self, cpu):
        ...
    def memory(self, mem):
        ...
    def environment_variable(self, name, value):
        ...
    def secret(self, name):
        ...
    def environment_variable_from_selector(self, name, label_value):
        ...
    def label(self, name, value):
        ...
    def annotation(self, name, value):
        ...
    def dump(self):
        ...
    ...

class KubernetesJobSet(object, metaclass=type):
    def __init__(self, client, name = None, namespace = None, num_parallel = None, **kwargs):
        ...
    @property
    def jobset_control_addr(self):
        ...
    @property
    def worker(self):
        ...
    @property
    def control(self):
        ...
    def environment_variable_from_selector(self, name, label_value):
        ...
    def environment_variables_from_selectors(self, env_dict):
        ...
    def environment_variable(self, name, value):
        ...
    def label(self, name, value):
        ...
    def annotation(self, name, value):
        ...
    def labels(self, labels):
        ...
    def annotations(self, annotations):
        ...
    def secret(self, name):
        ...
    def dump(self):
        ...
    def execute(self):
        ...
    ...

class KubernetesArgoJobSet(object, metaclass=type):
    def __init__(self, kubernetes_sdk, name = None, namespace = None, **kwargs):
        ...
    @property
    def jobset_control_addr(self):
        ...
    @property
    def worker(self):
        ...
    @property
    def control(self):
        ...
    def environment_variable_from_selector(self, name, label_value):
        ...
    def environment_variables_from_selectors(self, env_dict):
        ...
    def environment_variable(self, name, value):
        ...
    def label(self, name, value):
        ...
    def labels(self, labels):
        ...
    def annotation(self, name, value):
        ...
    def annotations(self, annotations):
        ...
    def dump(self):
        ...
    ...

