def __init__(self, namespace=None, runs=1, output=None, cleanup=True, labels=None, job_name=DEFAULT_JOB_NAME, stream_log=True, deployer_type=DEPLOPYER_TYPE, pod_spec_mutators=None): if namespace is None: self.namespace = utils.get_default_target_namespace() else: self.namespace = namespace # Used as pod and job name self.job_name = job_name self.deployment_spec = None self.runs = runs self.output = output self.backend = KubeManager() self.cleanup = cleanup self.stream_log = stream_log self.set_labels(labels, deployer_type) self.pod_spec_mutators = pod_spec_mutators or []
def __init__(self, framework, default_model_uri=None, canary_model_uri=None, canary_traffic_percent=0, namespace=None, labels=None, annotations=None, custom_default_spec=None, custom_canary_spec=None, stream_log=True, cleanup=False): self.framework = framework self.default_model_uri = default_model_uri self.canary_model_uri = canary_model_uri self.canary_traffic_percent = canary_traffic_percent self.annotations = annotations self.set_labels(labels) self.cleanup = cleanup self.custom_default_spec = custom_default_spec self.custom_canary_spec = custom_canary_spec self.stream_log = stream_log self.backend = KubeManager() if namespace is None: self.namespace = utils.get_default_target_namespace() else: self.namespace = namespace
def __init__(self, namespace=None, runs=1, output=None, labels={'fairing-deployer': 'job'}): if namespace is None: self.namespace = utils.get_default_target_namespace() else: self.namespace = namespace # Used as pod and job name self.deployment_spec = None self.runs = runs self.output = output self.labels = labels self.backend = KubeManager()
def __init__(self, namespace, runs): if namespace is None: self.namespace = utils.get_default_target_namespace() else: self.namespace = namespace # Used as pod and job name self.name = "{}-{}".format(DEFAULT_JOB_NAME, utils.get_unique_tag()) self.job_spec = None self.runs = runs self.builder = config.get_builder() self.backend = kubernetes.KubeManager()
def __init__(self, namespace=None, region=None, resource_group_name=None, storage_account_name=None): self.namespace = namespace or utils.get_default_target_namespace() self.region = region or "NorthEurope" self.resource_group_name = resource_group_name or "fairing" self.storage_account_name = storage_account_name or "fairing{}".format( uuid.uuid4().hex[:17]) self.share_name = constants.AZURE_FILES_SHARED_FOLDER self.context_hash = None self.context_path = None