[docs]classSynchronousFlyteClient(_RawSynchronousFlyteClient):
+ @property
+ defraw(self):
+ """
+ Gives access to the raw client
+ :rtype: flytekit.clients.raw.RawSynchronousFlyteClient
+ """
+ returnsuper(SynchronousFlyteClient,self)
+
###################################################################################################################### Task Endpoints
@@ -344,9 +354,6 @@
Source code for flytekit.clients.friendly
remains identical, calling this method multiple times will result in success. :param: flytekit.models.core.identifier.Identifier workflow_identifier: The identifier for this workflow.
- :param: Text version: The version identifier of this workflow. Used to distinguish between different iterations
- of tasks with the same name. If any aspect of the underlying workflow definition changes, then the version
- must also change to be accepted by the Flyte Admin Service. :param: flytekit.models.admin.workflow.WorkflowSpec workflow_spec: This is the actual definition of the workflow that should be created. :raises flytekit.common.exceptions.user.FlyteEntityAlreadyExistsException: If an identical version of the
@@ -497,9 +504,6 @@
Source code for flytekit.clients.friendly
remains identical, calling this method multiple times will result in success. :param: flytekit.models.core.identifier.Identifier launch_plan_identifer: The identifier for this launch plan.
- :param: Text version: The version identifier of this launch plan. Used to distinguish between different
- iterations of tasks with the same name. If any aspect of the underlying launch plan definition changes,
- then the version must also change to be accepted by the Flyte Admin Service. :param: flytekit.models.launch_plan.LaunchPlanSpec launch_plan_spec: This is the actual definition of the launch plan that should be created. :raises flytekit.common.exceptions.user.FlyteEntityAlreadyExistsException: If an identical version of the
diff --git a/_modules/flytekit/clients/helpers.html b/_modules/flytekit/clients/helpers.html
index f28f2b14e0..44fc2391e5 100644
--- a/_modules/flytekit/clients/helpers.html
+++ b/_modules/flytekit/clients/helpers.html
@@ -8,7 +8,7 @@
- flytekit.clients.helpers — Flyte 0.3.0 documentation
+ flytekit.clients.helpers — Flyte 0.4.0 documentation
diff --git a/_modules/flytekit/clients/raw.html b/_modules/flytekit/clients/raw.html
index 010c60e1d6..50b442b6be 100644
--- a/_modules/flytekit/clients/raw.html
+++ b/_modules/flytekit/clients/raw.html
@@ -8,7 +8,7 @@
- flytekit.clients.raw — Flyte 0.3.0 documentation
+ flytekit.clients.raw — Flyte 0.4.0 documentation
diff --git a/_modules/flytekit/clis/auth/auth.html b/_modules/flytekit/clis/auth/auth.html
index ebb0a224b2..db5aaa9886 100644
--- a/_modules/flytekit/clis/auth/auth.html
+++ b/_modules/flytekit/clis/auth/auth.html
@@ -8,7 +8,7 @@
- flytekit.clis.auth.auth — Flyte 0.3.0 documentation
+ flytekit.clis.auth.auth — Flyte 0.4.0 documentation
diff --git a/_modules/flytekit/clis/auth/credentials.html b/_modules/flytekit/clis/auth/credentials.html
index c458b06035..4c1345211c 100644
--- a/_modules/flytekit/clis/auth/credentials.html
+++ b/_modules/flytekit/clis/auth/credentials.html
@@ -8,7 +8,7 @@
- flytekit.clis.auth.credentials — Flyte 0.3.0 documentation
+ flytekit.clis.auth.credentials — Flyte 0.4.0 documentation
diff --git a/_modules/flytekit/clis/auth/discovery.html b/_modules/flytekit/clis/auth/discovery.html
index 706e8c5de1..34693ae359 100644
--- a/_modules/flytekit/clis/auth/discovery.html
+++ b/_modules/flytekit/clis/auth/discovery.html
@@ -8,7 +8,7 @@
- flytekit.clis.auth.discovery — Flyte 0.3.0 documentation
+ flytekit.clis.auth.discovery — Flyte 0.4.0 documentation
diff --git a/_modules/flytekit/clis/helpers.html b/_modules/flytekit/clis/helpers.html
index e613b882a6..9b9fb44e91 100644
--- a/_modules/flytekit/clis/helpers.html
+++ b/_modules/flytekit/clis/helpers.html
@@ -8,7 +8,7 @@
- flytekit.clis.helpers — Flyte 0.3.0 documentation
+ flytekit.clis.helpers — Flyte 0.4.0 documentation
diff --git a/_modules/flytekit/clis/sdk_in_container/basic_auth.html b/_modules/flytekit/clis/sdk_in_container/basic_auth.html
index a3d6180fda..52dbcefafb 100644
--- a/_modules/flytekit/clis/sdk_in_container/basic_auth.html
+++ b/_modules/flytekit/clis/sdk_in_container/basic_auth.html
@@ -8,7 +8,7 @@
- flytekit.clis.sdk_in_container.basic_auth — Flyte 0.3.0 documentation
+ flytekit.clis.sdk_in_container.basic_auth — Flyte 0.4.0 documentation
diff --git a/_modules/flytekit/clis/sdk_in_container/launch_plan.html b/_modules/flytekit/clis/sdk_in_container/launch_plan.html
index b071b7097d..3eb21768d9 100644
--- a/_modules/flytekit/clis/sdk_in_container/launch_plan.html
+++ b/_modules/flytekit/clis/sdk_in_container/launch_plan.html
@@ -8,7 +8,7 @@
- flytekit.clis.sdk_in_container.launch_plan — Flyte 0.3.0 documentation
+ flytekit.clis.sdk_in_container.launch_plan — Flyte 0.4.0 documentation
@@ -160,6 +160,7 @@
Source code for flytekit.clis.sdk_in_container.launch_plan
Source code for flytekit.clis.sdk_in_container.launch_plan
# TODO: We should optionally allow deactivation of missing launch plans
# Discover all launch plans by loading the modules
+ _logging.info(f"Setting this version's {version} launch plans active in {project}{domain}")form,k,lpiniterate_registerable_entities_in_order(pkgs,include_entities={_SdkLaunchPlan},detect_unreferenced_entities=False):
@@ -328,6 +330,7 @@
Source code for flytekit.clis.sdk_in_container.launch_plan
version
)ifnot(lp.is_scheduledandignore_schedules):
+ _logging.info(f"Setting active {_utils.fqdn(m.__name__, k, entity_type=lp.resource_type)}")lp.update(_launch_plan_model.LaunchPlanState.ACTIVE)
+
@click.group('register')# --pkgs on the register group is DEPRECATED, use same arg on pyflyte.main instead@click.option('--pkgs',multiple=True,help="DEPRECATED. This arg can only be used before the 'register' keyword")
diff --git a/_modules/flytekit/clis/sdk_in_container/serialize.html b/_modules/flytekit/clis/sdk_in_container/serialize.html
index e71ce38e2c..bfab509b25 100644
--- a/_modules/flytekit/clis/sdk_in_container/serialize.html
+++ b/_modules/flytekit/clis/sdk_in_container/serialize.html
@@ -8,7 +8,7 @@
- flytekit.clis.sdk_in_container.serialize — Flyte 0.3.0 documentation
+ flytekit.clis.sdk_in_container.serialize — Flyte 0.4.0 documentation
@@ -159,50 +159,136 @@
Source code for flytekit.clis.sdk_in_container.serialize
[docs]@system_entry_point
+defserialize_tasks_only(project,domain,pkgs,version,folder=None):
+ """
+ :param Text project:
+ :param Text domain:
+ :param list[Text] pkgs:
+ :param Text version:
+ :param Text folder:
+
+ :return:
+ """
+ # m = module (i.e. python file)
+ # k = value of dir(m), type str
+ # o = object (e.g. SdkWorkflow)
+ loaded_entities=[]
+ form,k,oiniterate_registerable_entities_in_order(pkgs,include_entities={_sdk_task.SdkTask}):
+ name=_utils.fqdn(m.__name__,k,entity_type=o.resource_type)
+ _logging.debug("Found module {}\n K: {} Instantiated in {}".format(m,k,o._instantiated_in))
+ o._id=_identifier.Identifier(
+ o.resource_type,
+ project,
+ domain,
+ name,
+ version
+ )
+ loaded_entities.append(o)
+
+ zero_padded_length=_determine_text_chars(len(loaded_entities))
+ fori,entityinenumerate(loaded_entities):
+ serialized=entity.serialize()
+ fname_index=str(i).zfill(zero_padded_length)
+ fname='{}_{}.pb'.format(fname_index,entity._id.name)
+ click.echo(' Writing {} to\n{}'.format(entity._id,fname))
+ iffolder:
+ fname=_os.path.join(folder,fname)
+ _write_proto_to_file(serialized,fname)
+
+ identifier_fname='{}_{}.identifier.pb'.format(fname_index,entity._id.name)
+ iffolder:
+ identifier_fname=_os.path.join(folder,identifier_fname)
+ _write_proto_to_file(entity._id.to_flyte_idl(),identifier_fname)
+
+
+
[docs]@system_entry_point
+defserialize_all(project,domain,pkgs,version,folder=None):
+ """
+ In order to register, we have to comply with Admin's endpoints. Those endpoints take the following objects. These
+ flyteidl.admin.launch_plan_pb2.LaunchPlanSpec
+ flyteidl.admin.workflow_pb2.WorkflowSpec
+ flyteidl.admin.task_pb2.TaskSpec
+
+ However, if we were to merely call .to_flyte_idl() on all the discovered entities, what we would get are:
+ flyteidl.admin.launch_plan_pb2.LaunchPlanSpec
+ flyteidl.core.workflow_pb2.WorkflowTemplate
+ flyteidl.core.tasks_pb2.TaskTemplate
+ For Workflows and Tasks therefore, there is special logic in the serialize function that translates these objects.
-
[docs]@system_entry_point
-defserialize_workflows(pkgs):
- # Create map to look up tasks by their unique identifier. This is so we can compile them into the workflow closure.
- tmap={}
- for_,_,tiniterate_registerable_entities_in_order(pkgs,include_entities={_sdk_task.SdkTask}):
- tmap[t.id]=t
+ :param Text project:
+ :param Text domain:
+ :param list[Text] pkgs:
+ :param Text version:
+ :param Text folder:
- form,k,winiterate_registerable_entities_in_order(pkgs,include_entities={_workflow.SdkWorkflow}):
- click.echo('Serializing {}'.format(_utils.fqdn(m.__name__,k,entity_type=w.resource_type)))
- task_templates=[]
- forninw.nodes:
- ifn.task_nodeisnotNone:
- task_templates.append(tmap[n.task_node.reference_id])
+ :return:
+ """
- wc=_WorkflowClosure(workflow=w,tasks=task_templates)
- wc_pb=wc.to_flyte_idl()
+ # m = module (i.e. python file)
+ # k = value of dir(m), type str
+ # o = object (e.g. SdkWorkflow)
+ loaded_entities=[]
+ form,k,oiniterate_registerable_entities_in_order(pkgs):
+ name=_utils.fqdn(m.__name__,k,entity_type=o.resource_type)
+ _logging.debug("Found module {}\n K: {} Instantiated in {}".format(m,k,o._instantiated_in))
+ o._id=_identifier.Identifier(
+ o.resource_type,
+ project,
+ domain,
+ name,
+ version
+ )
+ loaded_entities.append(o)
+
+ zero_padded_length=_determine_text_chars(len(loaded_entities))
+ fori,entityinenumerate(loaded_entities):
+ serialized=entity.serialize()
+ fname_index=str(i).zfill(zero_padded_length)
+ fname='{}_{}.pb'.format(fname_index,entity._id.name)
+ click.echo(' Writing {} to\n{}'.format(entity._id,fname))
+ iffolder:
+ fname=_os.path.join(folder,fname)
+ _write_proto_to_file(serialized,fname)
+
+ # Not everything serialized will necessarily have an identifier field in it, even though some do (like the
+ # TaskTemplate). To be more rigorous, we write an explicit identifier file that reflects the choices (like
+ # project/domain, etc.) made for this serialize call. We should not allow users to specify a different project
+ # for instance come registration time, to avoid mismatches between potential internal ids like the TaskTemplate
+ # and the registered entity.
+ identifier_fname='{}_{}.identifier.pb'.format(fname_index,entity._id.name)
+ iffolder:
+ identifier_fname=_os.path.join(folder,identifier_fname)
+ _write_proto_to_file(entity._id.to_flyte_idl(),identifier_fname)
+
+
+def_determine_text_chars(length):
+ """
+ This function is used to help prefix files. If there are only 10 entries, then we just need one digit (0-9) to be
+ the prefix. If there are 11, then we'll need two (00-10).
- fname='{}.pb'.format(_utils.fqdn(m.__name__,k,entity_type=w.resource_type))
- click.echo(' Writing workflow closure {}'.format(fname))
- _write_proto_to_file(wc_pb,fname)
+ :param int length:
+ :rtype: int
+ """
+ return_math.ceil(_math.log(length,10))@click.group('serialize')
@@ -215,37 +301,77 @@
Source code for flytekit.clis.sdk_in_container.serialize
object contains the WorkflowTemplate, along with the relevant tasks for that workflow. In lieu of Admin,
this serialization step will set the URN of the tasks to the fully qualified name of the task function. """
- click.echo('Serializing Flyte elements with image {}'.format(_IMAGE.get()))
+ click.echo('Serializing Flyte elements with image {}'.format(_internal_configuration.IMAGE.get()))@click.command('tasks')
+@click.option('-v','--version',type=str,help='Version to serialize tasks with. This is normally parsed from the'
+ 'image, but you can override here.')
+@click.option('-f','--folder',type=click.Path(exists=True))@click.pass_context
-deftasks(ctx):
+deftasks(ctx,version=None,folder=None):
+ project=ctx.obj[CTX_PROJECT]
+ domain=ctx.obj[CTX_DOMAIN]pkgs=ctx.obj[CTX_PACKAGES]
+
+ iffolder:
+ click.echo(f"Writing output to {folder}")
+
+ version=versionorctx.obj[CTX_VERSION]or_internal_configuration.look_up_version_from_image_tag(
+ _internal_configuration.IMAGE.get())
+
internal_settings={
- 'project':ctx.obj[CTX_PROJECT],
- 'domain':ctx.obj[CTX_DOMAIN],
- 'version':ctx.obj[CTX_VERSION]
+ 'project':project,
+ 'domain':domain,
+ 'version':version,}# Populate internal settings for project/domain/version from the environment so that the file names are resolved
- # with the correct strings. The file itself doesn't need to change though.
- withTemporaryConfiguration(CONFIGURATION_PATH.get(),internal_settings):
- serialize_tasks(pkgs)
+ # with the correct strings. The file itself doesn't need to change though.
+ withTemporaryConfiguration(_internal_configuration.CONFIGURATION_PATH.get(),internal_settings):
+ _logging.debug("Serializing with settings\n"
+ "\n Project: {}"
+ "\n Domain: {}"
+ "\n Version: {}"
+ "\n\nover the following packages {}".format(project,domain,version,pkgs)
+ )
+ serialize_tasks_only(project,domain,pkgs,version,folder)@click.command('workflows')
+@click.option('-v','--version',type=str,help='Version to serialize tasks with. This is normally parsed from the'
+ 'image, but you can override here.')
+# For now let's just assume that the directory needs to exist. If you're docker run -v'ing, docker will create the
+# directory for you so it shouldn't be a problem.
+@click.option('-f','--folder',type=click.Path(exists=True))@click.pass_context
-defworkflows(ctx):
+defworkflows(ctx,version=None,folder=None):
+ _logging.getLogger().setLevel(_logging.DEBUG)
+
+ iffolder:
+ click.echo(f"Writing output to {folder}")
+
+ project=ctx.obj[CTX_PROJECT]
+ domain=ctx.obj[CTX_DOMAIN]pkgs=ctx.obj[CTX_PACKAGES]
+
+ version=versionorctx.obj[CTX_VERSION]or_internal_configuration.look_up_version_from_image_tag(
+ _internal_configuration.IMAGE.get())
+
internal_settings={
- 'project':ctx.obj[CTX_PROJECT],
- 'domain':ctx.obj[CTX_DOMAIN],
- 'version':ctx.obj[CTX_VERSION]
+ 'project':project,
+ 'domain':domain,
+ 'version':version,}# Populate internal settings for project/domain/version from the environment so that the file names are resolved
- # with the correct strings. The file itself doesn't need to change though.
- withTemporaryConfiguration(CONFIGURATION_PATH.get(),internal_settings):
- serialize_workflows(pkgs)
+ # with the correct strings. The file itself doesn't need to change though.
+ withTemporaryConfiguration(_internal_configuration.CONFIGURATION_PATH.get(),internal_settings):
+ _logging.debug("Serializing with settings\n"
+ "\n Project: {}"
+ "\n Domain: {}"
+ "\n Version: {}"
+ "\n\nover the following packages {}".format(project,domain,version,pkgs)
+ )
+ serialize_all(project,domain,pkgs,version,folder)serialize.add_command(tasks)
diff --git a/_modules/flytekit/common/component_nodes.html b/_modules/flytekit/common/component_nodes.html
index a5627198ba..84cfac8365 100644
--- a/_modules/flytekit/common/component_nodes.html
+++ b/_modules/flytekit/common/component_nodes.html
@@ -8,7 +8,7 @@
- flytekit.common.component_nodes — Flyte 0.3.0 documentation
+ flytekit.common.component_nodes — Flyte 0.4.0 documentation
diff --git a/_modules/flytekit/common/constants.html b/_modules/flytekit/common/constants.html
index 9c33530919..0fe6be1544 100644
--- a/_modules/flytekit/common/constants.html
+++ b/_modules/flytekit/common/constants.html
@@ -8,7 +8,7 @@
- flytekit.common.constants — Flyte 0.3.0 documentation
+ flytekit.common.constants — Flyte 0.4.0 documentation
@@ -178,7 +178,8 @@
+ @_abc.abstractmethod
+ def_sync_closure(self):
+ """
+ Syncs the closure of the underlying execution artifact with the state observed by the platform.
+ :rtype: None
+ """
+ pass
+
[docs]defwait_for_completion(self,timeout=None,poll_interval=None):""" :param datetime.timedelta timeout: Amount of time to wait until the execution has completed before timing
@@ -222,12 +230,13 @@
Source code for flytekit.common.mixins.artifact
<
else:time_to_give_up=_datetime.datetime.utcnow()+timeout
- self.sync()
+ self._sync_closure()while_datetime.datetime.utcnow()<time_to_give_up:ifself.is_complete:
+ self.sync()return_time.sleep(poll_interval.total_seconds())
- self.sync()
+ self._sync_closure()raise_user_exceptions.FlyteTimeout("Execution {} did not complete before timeout.".format(self))
Source code for flytekit.common.mixins.registerable
:param Text domain: The domain in which to register this task.
:param Text name: The name to give this task. :param Text version: The version in which to register this task.
+ """
+ pass
+
+
[docs]@_abc.abstractmethod
+ defserialize(self,project,domain,name,version):
+ """
+ Registerable entities also are required to be serialized. This allows flytekit to separate serialization from
+ the network call to Admin (mostly at least, if a Launch Plan is fetched for instance as part of another
+ workflow, it will still hit Admin.
+
+ :param Text project: The project in which to serialize this task.
+ :param Text domain: The domain in which to serialize this task.
+ :param Text name: The name to give this task.
+ :param Text version: The version in which to serialize this task. """pass
# TODO: Sub-workflows too once implemented
+
+ def_sync_closure(self):
+ """
+ Syncs the closure of the underlying execution artifact with the state observed by the platform.
+ :rtype: None
+ """
+ ne=_engine_loader.get_engine().get_node_execution(self)
+ ne.sync()
+
+ def_sync_closure(self):
+ """
+ Syncs the closure of the underlying execution artifact with the state observed by the platform.
+ :rtype: None
+ """
+ _engine_loader.get_engine().get_task_execution(self).sync()
+def_append_node(generated_files,node,nodes,sub_task_node):
+ nodes.append(node)
+ fork,node_outputin_six.iteritems(sub_task_node.outputs):
+ ifnotnode_output.sdk_node.id:
+ node_output.sdk_node.assign_id_and_return(node.id)
+
+ # Upload inputs to working directory under /array_job.input_ref/inputs.pb
+ input_path=_os.path.join(node.id,_constants.INPUT_FILE_NAME)
+ generated_files[input_path]=_literal_models.LiteralMap(
+ literals={binding.var:binding.binding.to_literal_model()forbindingin
+ sub_task_node.inputs})
+
+
[docs]classSdkDynamicTask(_six.with_metaclass(_sdk_bases.ExtendedSdkType,_sdk_runnable.SdkRunnableTask)):""" This class includes the additional logic for building a task that executes parent-child tasks in Python code. It
@@ -279,6 +291,20 @@
Source code for flytekit.common.tasks.sdk_dynamic
"""
returntask_type==_constants.SdkTaskType.PYTHON_TASK
+ @staticmethod
+ def_add_upstream_entities(executable_sdk_object,sub_workflows,tasks):
+ forupstream_entityinexecutable_sdk_object.upstream_entities:
+ # If the upstream entity is either a Workflow or a Task, yield them in the
+ # dynamic job spec. Otherwise (e.g. a LaunchPlan), we will assume it already
+ # is registered (can't be dynamically created). Thi will cause a runtime error
+ # if it's not already registered with the control plane.
+ ifisinstance(upstream_entity,_workflow.SdkWorkflow):
+ sub_workflows.add(upstream_entity)
+ # Recursively discover all statically defined dependencies
+ SdkDynamicTask._add_upstream_entities(upstream_entity,sub_workflows,tasks)
+ elifisinstance(upstream_entity,_task.SdkTask):
+ tasks.add(upstream_entity)
+
def_produce_dynamic_job_spec(self,context,inputs):""" Runs user code and and produces future task nodes to run sub-tasks.
@@ -310,8 +336,9 @@
Source code for flytekit.common.tasks.sdk_dynamic
# Keeping future-tasks in original order. We don't use upstream_nodes exclusively because the parent task can
# yield sub-tasks that it never uses to produce final outputs but they need to execute nevertheless.array_job_index={}
- tasks=[]
+ tasks=set()nodes=[]
+ sub_workflows=set()visited_nodes=set()generated_ids={}effective_failure_ratio=self._allowed_failure_ratioor0.0
@@ -348,20 +375,18 @@
Source code for flytekit.common.tasks.sdk_dynamic
new_count =generated_ids[safe_task_id]=0unique_node_id=_dnsify("{}-{}".format(safe_task_id,new_count))
- # Handling cases where the yielded nodes are launch plan or subworkflow nodes
- ifisinstance(sub_task_node.executable_sdk_object,(_launch_plan.SdkLaunchPlan,_workflow.SdkWorkflow)):
+ # Handling case where the yielded node is launch plan
+ ifisinstance(sub_task_node.executable_sdk_object,_launch_plan.SdkLaunchPlan):node=sub_task_node.assign_id_and_return(unique_node_id)
- nodes.append(node)
- fork,node_outputin_six.iteritems(sub_task_node.outputs):
- ifnotnode_output.sdk_node.id:
- node_output.sdk_node.assign_id_and_return(node.id)
-
- # Upload inputs to working directory under /array_job.input_ref/inputs.pb
- input_path=_os.path.join(node.id,_constants.INPUT_FILE_NAME)
- generated_files[input_path]=_literal_models.LiteralMap(
- literals={binding.var:binding.binding.to_literal_model()forbindingin
- sub_task_node.inputs})
-
+ _append_node(generated_files,node,nodes,sub_task_node)
+ # Handling case where the yielded node is launching a sub-workflow
+ elifisinstance(sub_task_node.executable_sdk_object,_workflow.SdkWorkflow):
+ node=sub_task_node.assign_id_and_return(unique_node_id)
+ _append_node(generated_files,node,nodes,sub_task_node)
+ # Add the workflow itself to the yielded sub-workflows
+ sub_workflows.add(sub_task_node.executable_sdk_object)
+ # Recursively discover statically defined upstream entities (tasks, wfs)
+ SdkDynamicTask._add_upstream_entities(sub_task_node.executable_sdk_object,sub_workflows,tasks)# Handling taskselse:# If the task can run as an array job, group its instances together. Otherwise, keep each
@@ -389,24 +414,13 @@
Source code for flytekit.common.tasks.sdk_dynamic
sub_task_node.inputs})else:node=sub_task_node.assign_id_and_return(unique_node_id)
-
- tasks.append(sub_task_node.executable_sdk_object)
- nodes.append(node)
-
- fork,node_outputin_six.iteritems(sub_task_node.outputs):
- ifnotnode_output.sdk_node.id:
- node_output.sdk_node.assign_id_and_return(node.id)
-
- # Upload inputs to working directory under /array_job.input_ref/inputs.pb
- input_path=_os.path.join(node.id,_constants.INPUT_FILE_NAME)
- generated_files[input_path]=_literal_models.LiteralMap(
- literals={binding.var:binding.binding.to_literal_model()forbindingin
- sub_task_node.inputs})
+ tasks.add(sub_task_node.executable_sdk_object)
+ _append_node(generated_files,node,nodes,sub_task_node)# assign custom field to the ArrayJob properties computed.fortask,(array_job,_)in_six.iteritems(array_job_index):# TODO: Reconstruct task template object instead of modifying an existing one?
- tasks.append(task.assign_custom_and_return(array_job.to_dict()).assign_type_and_return(
+ tasks.add(task.assign_custom_and_return(array_job.to_dict()).assign_type_and_return(_constants.SdkTaskType.CONTAINER_ARRAY_TASK))# min_successes is absolute, it's computed as the reverse of allowed_failure_ratio and multiplied by the
@@ -414,10 +428,10 @@
[docs]@_exception_scopes.system_entry_point
+ defserialize(self):
+ """
+ Serializing a workflow should produce an object similar to what the registration step produces, in preparation
+ for actual registration to Admin.
+
+ :rtype: flyteidl.admin.workflow_pb2.WorkflowSpec
+ """
+ sub_workflows=self.get_sub_workflows()
+ return_admin_workflow_model.WorkflowSpec(
+ self,
+ sub_workflows,
+ ).to_flyte_idl()
+ def_sync_closure(self):
+ """
+ Syncs the closure of the underlying execution artifact with the state observed by the platform.
+ :rtype: None
+ """
+ ifnotself.is_complete:
+ _engine_loader.get_engine().get_workflow_execution(self).sync()
+
[docs]defpytorch_task(
+ _task_function=None,
+ cache_version='',
+ retries=0,
+ interruptible=False,
+ deprecated='',
+ cache=False,
+ timeout=None,
+ workers_count=1,
+ per_replica_storage_request="",
+ per_replica_cpu_request="",
+ per_replica_gpu_request="",
+ per_replica_memory_request="",
+ per_replica_storage_limit="",
+ per_replica_cpu_limit="",
+ per_replica_gpu_limit="",
+ per_replica_memory_limit="",
+ environment=None,
+ cls=None
+):
+ """
+ Decorator to create a Pytorch Task definition. This task will submit PyTorchJob (see https://github.com/kubeflow/pytorch-operator)
+ defined by the code within the _task_function to k8s cluster.
+
+ .. code-block:: python
+
+ @inputs(int_list=[Types.Integer])
+ @outputs(result=Types.Integer
+ @pytorch_task(
+ workers_count=2,
+ per_replica_cpu_request="500m",
+ per_replica_memory_request="4Gi",
+ per_replica_memory_limit="8Gi",
+ per_replica_gpu_limit="1",
+ )
+ def my_pytorch_job(wf_params, int_list, result):
+ pass
+
+ :param _task_function: this is the decorated method and shouldn't be declared explicitly. The function must
+ take a first argument, and then named arguments matching those defined in @inputs and @outputs. No keyword
+ arguments are allowed for wrapped task functions.
+
+ :param Text cache_version: [optional] string representing logical version for discovery. This field should be
+ updated whenever the underlying algorithm changes.
+
+ .. note::
+
+ This argument is required to be a non-empty string if `cache` is True.
+
+ :param int retries: [optional] integer determining number of times task can be retried on
+ :py:exc:`flytekit.sdk.exceptions.RecoverableException` or transient platform failures. Defaults
+ to 0.
+
+ .. note::
+
+ If retries > 0, the task must be able to recover from any remote state created within the user code. It is
+ strongly recommended that tasks are written to be idempotent.
+
+ :param bool interruptible: [optional] boolean describing if the task is interruptible.
+
+ :param Text deprecated: [optional] string that should be provided if this task is deprecated. The string
+ will be logged as a warning so it should contain information regarding how to update to a newer task.
+
+ :param bool cache: [optional] boolean describing if the outputs of this task should be cached and
+ re-usable.
+
+ :param datetime.timedelta timeout: [optional] describes how long the task should be allowed to
+ run at max before triggering a retry (if retries are enabled). By default, tasks are allowed to run
+ indefinitely. If a null timedelta is passed (i.e. timedelta(seconds=0)), the task will not timeout.
+
+ :param int workers_count: integer determining the number of worker replicas spawned in the cluster for this job
+ (in addition to 1 master).
+
+ :param Text per_replica_storage_request: [optional] Kubernetes resource string for lower-bound of disk storage space
+ for each replica spawned for this job (i.e. both for master and workers). Default is set by platform-level configuration.
+
+ .. note::
+
+ This is currently not supported by the platform.
+
+ :param Text per_replica_cpu_request: [optional] Kubernetes resource string for lower-bound of cores for each replica
+ spawned for this job (i.e. both for master and workers).
+ This can be set to a fractional portion of a CPU. Default is set by platform-level configuration.
+
+ TODO: Add links to resource string documentation for Kubernetes
+
+ :param Text per_replica_gpu_request: [optional] Kubernetes resource string for lower-bound of desired GPUs for each
+ replica spawned for this job (i.e. both for master and workers).
+ Default is set by platform-level configuration.
+
+ TODO: Add links to resource string documentation for Kubernetes
+
+ :param Text per_replica_memory_request: [optional] Kubernetes resource string for lower-bound of physical memory
+ necessary for each replica spawned for this job (i.e. both for master and workers). Default is set by platform-level configuration.
+
+ TODO: Add links to resource string documentation for Kubernetes
+
+ :param Text per_replica_storage_limit: [optional] Kubernetes resource string for upper-bound of disk storage space
+ for each replica spawned for this job (i.e. both for master and workers).
+ This amount is not guaranteed! If not specified, it is set equal to storage_request.
+
+ .. note::
+
+ This is currently not supported by the platform.
+
+ :param Text per_replica_cpu_limit: [optional] Kubernetes resource string for upper-bound of cores for each replica
+ spawned for this job (i.e. both for master and workers).
+ This can be set to a fractional portion of a CPU. This amount is not guaranteed! If not specified,
+ it is set equal to cpu_request.
+
+ :param Text per_replica_gpu_limit: [optional] Kubernetes resource string for upper-bound of desired GPUs for each
+ replica spawned for this job (i.e. both for master and workers).
+ This amount is not guaranteed! If not specified, it is set equal to gpu_request.
+
+ :param Text per_replica_memory_limit: [optional] Kubernetes resource string for upper-bound of physical memory
+ necessary for each replica spawned for this job (i.e. both for master and workers).
+ This amount is not guaranteed! If not specified, it is set equal to memory_request.
+
+ :param dict[Text,Text] environment: [optional] environment variables to set when executing this task.
+
+ :param cls: This can be used to override the task implementation with a user-defined extension. The class
+ provided must be a subclass of flytekit.common.tasks.sdk_runnable.SdkRunnableTask. A user can use this to
+ inject bespoke logic into the base Flyte programming model.
+
+ :rtype: flytekit.common.tasks.sdk_runnable.SdkRunnableTask
+ """
+ defwrapper(fn):
+ return(clsor_sdk_pytorch_tasks.SdkPyTorchTask)(
+ task_function=fn,
+ task_type=_common_constants.SdkTaskType.PYTORCH_TASK,
+ discovery_version=cache_version,
+ retries=retries,
+ interruptible=interruptible,
+ deprecated=deprecated,
+ discoverable=cache,
+ timeout=timeoutor_datetime.timedelta(seconds=0),
+ workers_count=workers_count,
+ per_replica_storage_request=per_replica_storage_request,
+ per_replica_cpu_request=per_replica_cpu_request,
+ per_replica_gpu_request=per_replica_gpu_request,
+ per_replica_memory_request=per_replica_memory_request,
+ per_replica_storage_limit=per_replica_storage_limit,
+ per_replica_cpu_limit=per_replica_cpu_limit,
+ per_replica_gpu_limit=per_replica_gpu_limit,
+ per_replica_memory_limit=per_replica_memory_limit,
+ environment=environmentor{}
+ )
+
+ if_task_function:
+ returnwrapper(_task_function)
+ else:
+ returnwrapper
diff --git a/_modules/random.html b/_modules/random.html
index 06a00eba78..c3ff308084 100644
--- a/_modules/random.html
+++ b/_modules/random.html
@@ -8,7 +8,7 @@
- random — Flyte 0.3.0 documentation
+ random — Flyte 0.4.0 documentation
diff --git a/_sources/flyteidl/admin/common.proto.rst.txt b/_sources/flyteidl/admin/common.proto.rst.txt
index 056dc8dd38..f6d28ba3c9 100644
--- a/_sources/flyteidl/admin/common.proto.rst.txt
+++ b/_sources/flyteidl/admin/common.proto.rst.txt
@@ -49,7 +49,7 @@ name
flyteidl.admin.NamedEntityMetadata
----------------------------------
-`[flyteidl.admin.NamedEntityMetadata proto] `_
+`[flyteidl.admin.NamedEntityMetadata proto] `_
.. code-block:: json
@@ -80,7 +80,7 @@ state
flyteidl.admin.NamedEntity
--------------------------
-`[flyteidl.admin.NamedEntity proto] `_
+`[flyteidl.admin.NamedEntity proto] `_
Describes information common to a NamedEntity, identified by a project /
domain / name / resource type combination
@@ -115,7 +115,7 @@ metadata
flyteidl.admin.Sort
-------------------
-`[flyteidl.admin.Sort proto] `_
+`[flyteidl.admin.Sort proto] `_
Species sort ordering in a list request.
@@ -146,7 +146,7 @@ direction
Enum flyteidl.admin.Sort.Direction
----------------------------------
-`[flyteidl.admin.Sort.Direction proto] `_
+`[flyteidl.admin.Sort.Direction proto] `_
.. _api_enum_value_flyteidl.admin.Sort.Direction.DESCENDING:
@@ -165,7 +165,7 @@ ASCENDING
flyteidl.admin.NamedEntityIdentifierListRequest
-----------------------------------------------
-`[flyteidl.admin.NamedEntityIdentifierListRequest proto] `_
+`[flyteidl.admin.NamedEntityIdentifierListRequest proto] `_
Represents a request structure to list identifiers.
@@ -227,7 +227,7 @@ filters
flyteidl.admin.NamedEntityListRequest
-------------------------------------
-`[flyteidl.admin.NamedEntityListRequest proto] `_
+`[flyteidl.admin.NamedEntityListRequest proto] `_
Represents a request structure to list NamedEntity objects
@@ -295,7 +295,7 @@ filters
flyteidl.admin.NamedEntityIdentifierList
----------------------------------------
-`[flyteidl.admin.NamedEntityIdentifierList proto] `_
+`[flyteidl.admin.NamedEntityIdentifierList proto] `_
Represents a list of NamedEntityIdentifiers.
@@ -326,7 +326,7 @@ token
flyteidl.admin.NamedEntityList
------------------------------
-`[flyteidl.admin.NamedEntityList proto] `_
+`[flyteidl.admin.NamedEntityList proto] `_
Represents a list of NamedEntityIdentifiers.
@@ -357,7 +357,7 @@ token
flyteidl.admin.NamedEntityGetRequest
------------------------------------
-`[flyteidl.admin.NamedEntityGetRequest proto] `_
+`[flyteidl.admin.NamedEntityGetRequest proto] `_
A request to retrieve the metadata associated with a NamedEntityIdentifier
@@ -385,7 +385,7 @@ id
flyteidl.admin.NamedEntityUpdateRequest
---------------------------------------
-`[flyteidl.admin.NamedEntityUpdateRequest proto] `_
+`[flyteidl.admin.NamedEntityUpdateRequest proto] `_
Request to set the referenced launch plan state to the configured value.
@@ -422,7 +422,7 @@ metadata
flyteidl.admin.NamedEntityUpdateResponse
----------------------------------------
-`[flyteidl.admin.NamedEntityUpdateResponse proto] `_
+`[flyteidl.admin.NamedEntityUpdateResponse proto] `_
Purposefully empty, may be populated in the future.
@@ -438,7 +438,7 @@ Purposefully empty, may be populated in the future.
flyteidl.admin.ObjectGetRequest
-------------------------------
-`[flyteidl.admin.ObjectGetRequest proto] `_
+`[flyteidl.admin.ObjectGetRequest proto] `_
Represents a structure to fetch a single resource.
@@ -461,7 +461,7 @@ id
flyteidl.admin.ResourceListRequest
----------------------------------
-`[flyteidl.admin.ResourceListRequest proto] `_
+`[flyteidl.admin.ResourceListRequest proto] `_
Represents a request structure to retrieve a list of resources.
Resources include: Task, Workflow, LaunchPlan
@@ -518,7 +518,7 @@ sort_by
flyteidl.admin.EmailNotification
--------------------------------
-`[flyteidl.admin.EmailNotification proto] `_
+`[flyteidl.admin.EmailNotification proto] `_
.. code-block:: json
@@ -540,7 +540,7 @@ recipients_email
flyteidl.admin.PagerDutyNotification
------------------------------------
-`[flyteidl.admin.PagerDutyNotification proto] `_
+`[flyteidl.admin.PagerDutyNotification proto] `_
.. code-block:: json
@@ -562,7 +562,7 @@ recipients_email
flyteidl.admin.SlackNotification
--------------------------------
-`[flyteidl.admin.SlackNotification proto] `_
+`[flyteidl.admin.SlackNotification proto] `_
.. code-block:: json
@@ -584,7 +584,7 @@ recipients_email
flyteidl.admin.Notification
---------------------------
-`[flyteidl.admin.Notification proto] `_
+`[flyteidl.admin.Notification proto] `_
Represents a structure for notifications based on execution status.
The Notification content is configured within Admin. Future iterations could
@@ -637,7 +637,7 @@ slack
flyteidl.admin.UrlBlob
----------------------
-`[flyteidl.admin.UrlBlob proto] `_
+`[flyteidl.admin.UrlBlob proto] `_
Represents a string url and associated metadata used throughout the platform.
@@ -667,7 +667,7 @@ bytes
flyteidl.admin.Labels
---------------------
-`[flyteidl.admin.Labels proto] `_
+`[flyteidl.admin.Labels proto] `_
Label values to be applied to an execution resource.
In the future a mode (e.g. OVERRIDE, APPEND, etc) can be defined
@@ -692,7 +692,7 @@ values
flyteidl.admin.Annotations
--------------------------
-`[flyteidl.admin.Annotations proto] `_
+`[flyteidl.admin.Annotations proto] `_
Annotation values to be applied to an execution resource.
In the future a mode (e.g. OVERRIDE, APPEND, etc) can be defined
@@ -711,6 +711,40 @@ values
+
+.. _api_msg_flyteidl.admin.AuthRole:
+
+flyteidl.admin.AuthRole
+-----------------------
+
+`[flyteidl.admin.AuthRole proto] `_
+
+Defines permissions associated with executions.
+
+.. code-block:: json
+
+ {
+ "assumable_iam_role": "...",
+ "kubernetes_service_account": "..."
+ }
+
+.. _api_field_flyteidl.admin.AuthRole.assumable_iam_role:
+
+assumable_iam_role
+ (`string `_)
+
+
+ Only one of :ref:`assumable_iam_role `, :ref:`kubernetes_service_account ` may be set.
+
+.. _api_field_flyteidl.admin.AuthRole.kubernetes_service_account:
+
+kubernetes_service_account
+ (`string `_)
+
+
+ Only one of :ref:`assumable_iam_role `, :ref:`kubernetes_service_account ` may be set.
+
+
.. _api_enum_flyteidl.admin.NamedEntityState:
Enum flyteidl.admin.NamedEntityState
@@ -732,3 +766,9 @@ NAMED_ENTITY_ARCHIVED
Archived named entities are no longer visible in the UI.
+.. _api_enum_value_flyteidl.admin.NamedEntityState.SYSTEM_GENERATED:
+
+SYSTEM_GENERATED
+ System generated entities that aren't explicitly created or managed by a user.
+
+
diff --git a/_sources/flyteidl/admin/execution.proto.rst.txt b/_sources/flyteidl/admin/execution.proto.rst.txt
index b3aadb9950..1b11172e89 100644
--- a/_sources/flyteidl/admin/execution.proto.rst.txt
+++ b/_sources/flyteidl/admin/execution.proto.rst.txt
@@ -568,7 +568,8 @@ of an execution as it progresses across phase changes..
"notifications": "{...}",
"disable_all": "...",
"labels": "{...}",
- "annotations": "{...}"
+ "annotations": "{...}",
+ "auth_role": "{...}"
}
.. _api_field_flyteidl.admin.ExecutionSpec.launch_plan:
@@ -621,6 +622,12 @@ annotations
(:ref:`flyteidl.admin.Annotations `) Annotations to apply to the execution resource.
+.. _api_field_flyteidl.admin.ExecutionSpec.auth_role:
+
+auth_role
+ (:ref:`flyteidl.admin.AuthRole `) Optional: auth override to apply this execution.
+
+
.. _api_msg_flyteidl.admin.ExecutionTerminateRequest:
@@ -628,7 +635,7 @@ annotations
flyteidl.admin.ExecutionTerminateRequest
----------------------------------------
-`[flyteidl.admin.ExecutionTerminateRequest proto] `_
+`[flyteidl.admin.ExecutionTerminateRequest proto] `_
Request to terminate an in-progress execution. This action is irreversible.
If an execution is already terminated, this request will simply be a no-op.
@@ -662,7 +669,7 @@ cause
flyteidl.admin.ExecutionTerminateResponse
-----------------------------------------
-`[flyteidl.admin.ExecutionTerminateResponse proto] `_
+`[flyteidl.admin.ExecutionTerminateResponse proto] `_
.. code-block:: json
@@ -677,7 +684,7 @@ flyteidl.admin.ExecutionTerminateResponse
flyteidl.admin.WorkflowExecutionGetDataRequest
----------------------------------------------
-`[flyteidl.admin.WorkflowExecutionGetDataRequest proto] `_
+`[flyteidl.admin.WorkflowExecutionGetDataRequest proto] `_
Request structure to fetch inputs and output urls for an execution.
@@ -700,7 +707,7 @@ id
flyteidl.admin.WorkflowExecutionGetDataResponse
-----------------------------------------------
-`[flyteidl.admin.WorkflowExecutionGetDataResponse proto] `_
+`[flyteidl.admin.WorkflowExecutionGetDataResponse proto] `_
Response structure for WorkflowExecutionGetDataRequest which contains inputs and outputs for an execution.
diff --git a/_sources/flyteidl/admin/launch_plan.proto.rst.txt b/_sources/flyteidl/admin/launch_plan.proto.rst.txt
index cf1da40549..1834146912 100644
--- a/_sources/flyteidl/admin/launch_plan.proto.rst.txt
+++ b/_sources/flyteidl/admin/launch_plan.proto.rst.txt
@@ -170,7 +170,8 @@ User-provided launch plan definition and configuration values.
"role": "...",
"labels": "{...}",
"annotations": "{...}",
- "auth": "{...}"
+ "auth": "{...}",
+ "auth_role": "{...}"
}
.. _api_field_flyteidl.admin.LaunchPlanSpec.workflow_id:
@@ -221,6 +222,11 @@ auth
(:ref:`flyteidl.admin.Auth `) Indicates the permission associated with workflow executions triggered with this launch plan.
+.. _api_field_flyteidl.admin.LaunchPlanSpec.auth_role:
+
+auth_role
+ (:ref:`flyteidl.admin.AuthRole `)
+
.. _api_msg_flyteidl.admin.LaunchPlanClosure:
@@ -228,7 +234,7 @@ auth
flyteidl.admin.LaunchPlanClosure
--------------------------------
-`[flyteidl.admin.LaunchPlanClosure proto] `_
+`[flyteidl.admin.LaunchPlanClosure proto] `_
Values computed by the flyte platform after launch plan registration.
These include expected_inputs required to be present in a CreateExecutionRequest
@@ -281,7 +287,7 @@ updated_at
flyteidl.admin.LaunchPlanMetadata
---------------------------------
-`[flyteidl.admin.LaunchPlanMetadata proto] `_
+`[flyteidl.admin.LaunchPlanMetadata proto] `_
Additional launch plan attributes included in the LaunchPlanSpec not strictly required to launch
the reference workflow.
@@ -312,7 +318,7 @@ notifications
flyteidl.admin.LaunchPlanUpdateRequest
--------------------------------------
-`[flyteidl.admin.LaunchPlanUpdateRequest proto] `_
+`[flyteidl.admin.LaunchPlanUpdateRequest proto] `_
Request to set the referenced launch plan state to the configured value.
@@ -342,7 +348,7 @@ state
flyteidl.admin.LaunchPlanUpdateResponse
---------------------------------------
-`[flyteidl.admin.LaunchPlanUpdateResponse proto] `_
+`[flyteidl.admin.LaunchPlanUpdateResponse proto] `_
Purposefully empty, may be populated in the future.
@@ -358,7 +364,7 @@ Purposefully empty, may be populated in the future.
flyteidl.admin.ActiveLaunchPlanRequest
--------------------------------------
-`[flyteidl.admin.ActiveLaunchPlanRequest proto] `_
+`[flyteidl.admin.ActiveLaunchPlanRequest proto] `_
Represents a request struct for finding an active launch plan for a given NamedEntityIdentifier
@@ -380,7 +386,7 @@ id
flyteidl.admin.ActiveLaunchPlanListRequest
------------------------------------------
-`[flyteidl.admin.ActiveLaunchPlanListRequest proto] `_
+`[flyteidl.admin.ActiveLaunchPlanListRequest proto] `_
Represents a request structure to list active launch plans within a project/domain.
diff --git a/_sources/flyteidl/core/errors.proto.rst.txt b/_sources/flyteidl/core/errors.proto.rst.txt
index 4d5107f5de..988ea2f3dd 100644
--- a/_sources/flyteidl/core/errors.proto.rst.txt
+++ b/_sources/flyteidl/core/errors.proto.rst.txt
@@ -8,7 +8,7 @@ errors.proto
flyteidl.core.ContainerError
----------------------------
-`[flyteidl.core.ContainerError proto] `_
+`[flyteidl.core.ContainerError proto] `_
Error message to propagate detailed errors from container executions to the execution
engine.
@@ -18,7 +18,8 @@ engine.
{
"code": "...",
"message": "...",
- "kind": "..."
+ "kind": "...",
+ "origin": "..."
}
.. _api_field_flyteidl.core.ContainerError.code:
@@ -39,13 +40,19 @@ kind
(:ref:`flyteidl.core.ContainerError.Kind `) An abstract error kind for this error. Defaults to Non_Recoverable if not specified.
+.. _api_field_flyteidl.core.ContainerError.origin:
+
+origin
+ (:ref:`flyteidl.core.ExecutionError.ErrorKind `) Defines the origin of the error (system, user, unknown).
+
+
.. _api_enum_flyteidl.core.ContainerError.Kind:
Enum flyteidl.core.ContainerError.Kind
--------------------------------------
-`[flyteidl.core.ContainerError.Kind proto] `_
+`[flyteidl.core.ContainerError.Kind proto] `_
Defines a generic error type that dictates the behavior of the retry strategy.
@@ -65,7 +72,7 @@ RECOVERABLE
flyteidl.core.ErrorDocument
---------------------------
-`[flyteidl.core.ErrorDocument proto] `_
+`[flyteidl.core.ErrorDocument proto] `_
Defines the errors.pb file format the container can produce to communicate
failure reasons to the execution engine.
diff --git a/_sources/flyteidl/core/tasks.proto.rst.txt b/_sources/flyteidl/core/tasks.proto.rst.txt
index c7f0259433..d316d52df7 100644
--- a/_sources/flyteidl/core/tasks.proto.rst.txt
+++ b/_sources/flyteidl/core/tasks.proto.rst.txt
@@ -334,7 +334,8 @@ flyteidl.core.Container
"resources": "{...}",
"env": [],
"config": [],
- "ports": []
+ "ports": [],
+ "data_config": "{...}"
}
.. _api_field_flyteidl.core.Container.image:
@@ -381,6 +382,192 @@ config
ports
(:ref:`flyteidl.core.ContainerPort `) Ports to open in the container. This feature is not supported by all execution engines. (e.g. supported on K8s but
not supported on AWS Batch)
+ Only K8s
+.. _api_field_flyteidl.core.Container.data_config:
+data_config
+ (:ref:`flyteidl.core.DataLoadingConfig `) BETA: Optional configuration for DataLoading. If not specified, then default values are used.
+ This makes it possible to to run a completely portable container, that uses inputs and outputs
+ only from the local file-system and without having any reference to flyteidl. This is supported only on K8s at the moment.
+ If data loading is enabled, then data will be mounted in accompanying directories specified in the DataLoadingConfig. If the directories
+ are not specified, inputs will be mounted onto and outputs will be uploaded from a pre-determined file-system path. Refer to the documentation
+ to understand the default paths.
+ Only K8s
+
+
+
+
+.. _api_msg_flyteidl.core.IOStrategy:
+
+flyteidl.core.IOStrategy
+------------------------
+
+`[flyteidl.core.IOStrategy proto] `_
+
+Strategy to use when dealing with Blob, Schema, or multipart blob data (large datasets)
+
+.. code-block:: json
+
+ {
+ "download_mode": "...",
+ "upload_mode": "..."
+ }
+
+.. _api_field_flyteidl.core.IOStrategy.download_mode:
+
+download_mode
+ (:ref:`flyteidl.core.IOStrategy.DownloadMode `) Mode to use to manage downloads
+
+
+.. _api_field_flyteidl.core.IOStrategy.upload_mode:
+
+upload_mode
+ (:ref:`flyteidl.core.IOStrategy.UploadMode `) Mode to use to manage uploads
+
+
+
+.. _api_enum_flyteidl.core.IOStrategy.DownloadMode:
+
+Enum flyteidl.core.IOStrategy.DownloadMode
+------------------------------------------
+
+`[flyteidl.core.IOStrategy.DownloadMode proto] `_
+
+Mode to use for downloading
+
+.. _api_enum_value_flyteidl.core.IOStrategy.DownloadMode.DOWNLOAD_EAGER:
+
+DOWNLOAD_EAGER
+ *(DEFAULT)* All data will be downloaded before the main container is executed
+
+
+.. _api_enum_value_flyteidl.core.IOStrategy.DownloadMode.DOWNLOAD_STREAM:
+
+DOWNLOAD_STREAM
+ Data will be downloaded as a stream and an End-Of-Stream marker will be written to indicate all data has been downloaded. Refer to protocol for details
+
+
+.. _api_enum_value_flyteidl.core.IOStrategy.DownloadMode.DO_NOT_DOWNLOAD:
+
+DO_NOT_DOWNLOAD
+ Large objects (offloaded) will not be downloaded
+
+
+
+.. _api_enum_flyteidl.core.IOStrategy.UploadMode:
+
+Enum flyteidl.core.IOStrategy.UploadMode
+----------------------------------------
+
+`[flyteidl.core.IOStrategy.UploadMode proto] `_
+
+Mode to use for uploading
+
+.. _api_enum_value_flyteidl.core.IOStrategy.UploadMode.UPLOAD_ON_EXIT:
+
+UPLOAD_ON_EXIT
+ *(DEFAULT)* All data will be uploaded after the main container exits
+
+
+.. _api_enum_value_flyteidl.core.IOStrategy.UploadMode.UPLOAD_EAGER:
+
+UPLOAD_EAGER
+ Data will be uploaded as it appears. Refer to protocol specification for details
+
+
+.. _api_enum_value_flyteidl.core.IOStrategy.UploadMode.DO_NOT_UPLOAD:
+
+DO_NOT_UPLOAD
+ Data will not be uploaded, only references will be written
+
+
+
+.. _api_msg_flyteidl.core.DataLoadingConfig:
+
+flyteidl.core.DataLoadingConfig
+-------------------------------
+
+`[flyteidl.core.DataLoadingConfig proto] `_
+
+This configuration allows executing raw containers in Flyte using the Flyte CoPilot system.
+Flyte CoPilot, eliminates the needs of flytekit or sdk inside the container. Any inputs required by the users container are side-loaded in the input_path
+Any outputs generated by the user container - within output_path are automatically uploaded.
+
+.. code-block:: json
+
+ {
+ "enabled": "...",
+ "input_path": "...",
+ "output_path": "...",
+ "format": "...",
+ "io_strategy": "{...}"
+ }
+
+.. _api_field_flyteidl.core.DataLoadingConfig.enabled:
+
+enabled
+ (`bool `_) Flag enables DataLoading Config. If this is not set, data loading will not be used!
+
+
+.. _api_field_flyteidl.core.DataLoadingConfig.input_path:
+
+input_path
+ (`string `_) File system path (start at root). This folder will contain all the inputs exploded to a separate file.
+ Example, if the input interface needs (x: int, y: blob, z: multipart_blob) and the input path is "/var/flyte/inputs", then the file system will look like
+ /var/flyte/inputs/inputs. .pb .json .yaml> -> Format as defined previously. The Blob and Multipart blob will reference local filesystem instead of remote locations
+ /var/flyte/inputs/x -> X is a file that contains the value of x (integer) in string format
+ /var/flyte/inputs/y -> Y is a file in Binary format
+ /var/flyte/inputs/z/... -> Note Z itself is a directory
+ More information about the protocol - refer to docs #TODO reference docs here
+
+
+.. _api_field_flyteidl.core.DataLoadingConfig.output_path:
+
+output_path
+ (`string `_) File system path (start at root). This folder should contain all the outputs for the task as individual files and/or an error text file
+
+
+.. _api_field_flyteidl.core.DataLoadingConfig.format:
+
+format
+ (:ref:`flyteidl.core.DataLoadingConfig.LiteralMapFormat `) In the inputs folder, there will be an additional summary/metadata file that contains references to all files or inlined primitive values.
+ This format decides the actual encoding for the data. Refer to the encoding to understand the specifics of the contents and the encoding
+
+
+.. _api_field_flyteidl.core.DataLoadingConfig.io_strategy:
+
+io_strategy
+ (:ref:`flyteidl.core.IOStrategy `)
+
+
+.. _api_enum_flyteidl.core.DataLoadingConfig.LiteralMapFormat:
+
+Enum flyteidl.core.DataLoadingConfig.LiteralMapFormat
+-----------------------------------------------------
+
+`[flyteidl.core.DataLoadingConfig.LiteralMapFormat proto] `_
+
+LiteralMapFormat decides the encoding format in which the input metadata should be made available to the containers.
+If the user has access to the protocol buffer definitions, it is recommended to use the PROTO format.
+JSON and YAML do not need any protobuf definitions to read it
+All remote references in core.LiteralMap are replaced with local filesystem references (the data is downloaded to local filesystem)
+
+.. _api_enum_value_flyteidl.core.DataLoadingConfig.LiteralMapFormat.JSON:
+
+JSON
+ *(DEFAULT)* JSON / YAML for the metadata (which contains inlined primitive values). The representation is inline with the standard json specification as specified - https://www.json.org/json-en.html
+
+
+.. _api_enum_value_flyteidl.core.DataLoadingConfig.LiteralMapFormat.YAML:
+
+YAML
+
+
+.. _api_enum_value_flyteidl.core.DataLoadingConfig.LiteralMapFormat.PROTO:
+
+PROTO
+ Proto is a serialized binary of `core.LiteralMap` defined in flyteidl/core
+
+
diff --git a/_sources/flyteidl/plugins/index.rst.txt b/_sources/flyteidl/plugins/index.rst.txt
index c2943c6d26..43ca143352 100644
--- a/_sources/flyteidl/plugins/index.rst.txt
+++ b/_sources/flyteidl/plugins/index.rst.txt
@@ -12,6 +12,7 @@ Plugins available in the Flyte system.
array_job.proto
presto.proto
+ pytorch.proto
qubole.proto
sidecar.proto
spark.proto
diff --git a/_sources/flyteidl/plugins/pytorch.proto.rst.txt b/_sources/flyteidl/plugins/pytorch.proto.rst.txt
new file mode 100644
index 0000000000..4448503623
--- /dev/null
+++ b/_sources/flyteidl/plugins/pytorch.proto.rst.txt
@@ -0,0 +1,27 @@
+.. _api_file_flyteidl/plugins/pytorch.proto:
+
+pytorch.proto
+==============================
+
+.. _api_msg_flyteidl.plugins.DistributedPyTorchTrainingTask:
+
+flyteidl.plugins.DistributedPyTorchTrainingTask
+-----------------------------------------------
+
+`[flyteidl.plugins.DistributedPyTorchTrainingTask proto] `_
+
+Custom proto for plugin that enables distributed training using https://github.com/kubeflow/pytorch-operator
+
+.. code-block:: json
+
+ {
+ "workers": "..."
+ }
+
+.. _api_field_flyteidl.plugins.DistributedPyTorchTrainingTask.workers:
+
+workers
+ (`int32 `_) number of worker replicas spawned in the cluster for this job
+
+
+
diff --git a/_sources/flytekit/flytekit.common.tasks.rst.txt b/_sources/flytekit/flytekit.common.tasks.rst.txt
index 48e80d5486..a9023fd22a 100644
--- a/_sources/flytekit/flytekit.common.tasks.rst.txt
+++ b/_sources/flytekit/flytekit.common.tasks.rst.txt
@@ -44,6 +44,14 @@ flytekit.common.tasks.presto\_task module
:undoc-members:
:show-inheritance:
+flytekit.common.tasks.pytorch\_task module
+------------------------------------------
+
+.. automodule:: flytekit.common.tasks.pytorch_task
+ :members:
+ :undoc-members:
+ :show-inheritance:
+
flytekit.common.tasks.sdk\_dynamic module
-----------------------------------------
diff --git a/_static/documentation_options.js b/_static/documentation_options.js
index f3296e0a63..24568a7ac0 100644
--- a/_static/documentation_options.js
+++ b/_static/documentation_options.js
@@ -1,6 +1,6 @@
var DOCUMENTATION_OPTIONS = {
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
- VERSION: '0.3.0',
+ VERSION: '0.4.0',
LANGUAGE: 'None',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
diff --git a/administrator/architecture.html b/administrator/architecture.html
index d336980271..8aaf038b9d 100644
--- a/administrator/architecture.html
+++ b/administrator/architecture.html
@@ -8,7 +8,7 @@
- Architecture — Flyte 0.3.0 documentation
+ Architecture — Flyte 0.4.0 documentation
diff --git a/administrator/index.html b/administrator/index.html
index e9a62b17ad..cbcabe7c37 100644
--- a/administrator/index.html
+++ b/administrator/index.html
@@ -8,7 +8,7 @@
- Administrator Docs — Flyte 0.3.0 documentation
+ Administrator Docs — Flyte 0.4.0 documentation
diff --git a/administrator/install/authentication.html b/administrator/install/authentication.html
index e5fdab08c0..41f0be3fe5 100644
--- a/administrator/install/authentication.html
+++ b/administrator/install/authentication.html
@@ -8,7 +8,7 @@
- Authentication — Flyte 0.3.0 documentation
+ Authentication — Flyte 0.4.0 documentation
diff --git a/administrator/install/configure/admin.html b/administrator/install/configure/admin.html
index 9a9688d08d..710e614062 100644
--- a/administrator/install/configure/admin.html
+++ b/administrator/install/configure/admin.html
@@ -8,7 +8,7 @@
- FlyteAdmin Configuration — Flyte 0.3.0 documentation
+ FlyteAdmin Configuration — Flyte 0.4.0 documentation
diff --git a/administrator/install/configure/common.html b/administrator/install/configure/common.html
index eb218ba3ab..1b4a4910b3 100644
--- a/administrator/install/configure/common.html
+++ b/administrator/install/configure/common.html
@@ -8,7 +8,7 @@
- Common configuration across all backend components — Flyte 0.3.0 documentation
+ Common configuration across all backend components — Flyte 0.4.0 documentation
diff --git a/administrator/install/configure/index.html b/administrator/install/configure/index.html
index 20561591cb..d9dcc53cff 100644
--- a/administrator/install/configure/index.html
+++ b/administrator/install/configure/index.html
@@ -8,7 +8,7 @@
- Configure Flyte backend — Flyte 0.3.0 documentation
+ Configure Flyte backend — Flyte 0.4.0 documentation
diff --git a/administrator/install/configure/plugins.html b/administrator/install/configure/plugins.html
index 20b38387b9..85aa32093a 100644
--- a/administrator/install/configure/plugins.html
+++ b/administrator/install/configure/plugins.html
@@ -8,7 +8,7 @@
- Plugin Configuration — Flyte 0.3.0 documentation
+ Plugin Configuration — Flyte 0.4.0 documentation
diff --git a/administrator/install/configure/propeller.html b/administrator/install/configure/propeller.html
index 407ffe14ca..764cbd82b7 100644
--- a/administrator/install/configure/propeller.html
+++ b/administrator/install/configure/propeller.html
@@ -8,7 +8,7 @@
- Propeller Configuration — Flyte 0.3.0 documentation
+ Propeller Configuration — Flyte 0.4.0 documentation
diff --git a/administrator/install/getting_started.html b/administrator/install/getting_started.html
index a11a17fbfc..882345a132 100644
--- a/administrator/install/getting_started.html
+++ b/administrator/install/getting_started.html
@@ -8,7 +8,7 @@
- Getting Started — Flyte 0.3.0 documentation
+ Getting Started — Flyte 0.4.0 documentation
diff --git a/administrator/install/index.html b/administrator/install/index.html
index d5ee39b4b8..66869f403e 100644
--- a/administrator/install/index.html
+++ b/administrator/install/index.html
@@ -8,7 +8,7 @@
- Installing Flyte — Flyte 0.3.0 documentation
+ Installing Flyte — Flyte 0.4.0 documentation
diff --git a/administrator/install/managing_customizable_resources.html b/administrator/install/managing_customizable_resources.html
index 36bf1e85f8..b998c7abbc 100644
--- a/administrator/install/managing_customizable_resources.html
+++ b/administrator/install/managing_customizable_resources.html
@@ -8,7 +8,7 @@
- Configuring customizable resources — Flyte 0.3.0 documentation
+ Configuring customizable resources — Flyte 0.4.0 documentation
diff --git a/administrator/install/multi_cluster.html b/administrator/install/multi_cluster.html
index 59f772c593..9f1a2796c4 100644
--- a/administrator/install/multi_cluster.html
+++ b/administrator/install/multi_cluster.html
@@ -8,7 +8,7 @@
- Scaling Beyond Kubernetes — Flyte 0.3.0 documentation
+ Scaling Beyond Kubernetes — Flyte 0.4.0 documentation
diff --git a/administrator/install/optional_components.html b/administrator/install/optional_components.html
index 9ed407c3fb..610bf58653 100644
--- a/administrator/install/optional_components.html
+++ b/administrator/install/optional_components.html
@@ -8,7 +8,7 @@
- Optional Components — Flyte 0.3.0 documentation
+ Optional Components — Flyte 0.4.0 documentation
diff --git a/administrator/install/production.html b/administrator/install/production.html
index 0afe049801..0c894c5fd4 100644
--- a/administrator/install/production.html
+++ b/administrator/install/production.html
@@ -8,7 +8,7 @@
- Handling Production Load — Flyte 0.3.0 documentation
+ Handling Production Load — Flyte 0.4.0 documentation
diff --git a/contributor/components/admin.html b/contributor/components/admin.html
index 5f5f0aca61..cb93d4b72b 100644
--- a/contributor/components/admin.html
+++ b/contributor/components/admin.html
@@ -8,7 +8,7 @@
- FlyteAdmin — Flyte 0.3.0 documentation
+ FlyteAdmin — Flyte 0.4.0 documentation
diff --git a/contributor/components/admin_service.html b/contributor/components/admin_service.html
index de9dec8bdd..2f629ce024 100644
--- a/contributor/components/admin_service.html
+++ b/contributor/components/admin_service.html
@@ -8,7 +8,7 @@
- FlyteAdmin Service Background — Flyte 0.3.0 documentation
+ FlyteAdmin Service Background — Flyte 0.4.0 documentation
diff --git a/contributor/components/catalog.html b/contributor/components/catalog.html
index 7f67907229..e078d9b079 100644
--- a/contributor/components/catalog.html
+++ b/contributor/components/catalog.html
@@ -8,7 +8,7 @@
- What is Data Catalog? — Flyte 0.3.0 documentation
+ What is Data Catalog? — Flyte 0.4.0 documentation
diff --git a/contributor/components/console.html b/contributor/components/console.html
index f5f2d1185d..b3f1247f36 100644
--- a/contributor/components/console.html
+++ b/contributor/components/console.html
@@ -8,7 +8,7 @@
- Flyte Console — Flyte 0.3.0 documentation
+ Flyte Console — Flyte 0.4.0 documentation
diff --git a/contributor/components/index.html b/contributor/components/index.html
index a919d91e2e..fdc5d6fdfb 100644
--- a/contributor/components/index.html
+++ b/contributor/components/index.html
@@ -8,7 +8,7 @@
- Flyte System Components — Flyte 0.3.0 documentation
+ Flyte System Components — Flyte 0.4.0 documentation
diff --git a/contributor/docs/index.html b/contributor/docs/index.html
index f6f9bf2fb2..e4e17c785a 100644
--- a/contributor/docs/index.html
+++ b/contributor/docs/index.html
@@ -8,7 +8,7 @@
- Contributing to Docs — Flyte 0.3.0 documentation
+ Contributing to Docs — Flyte 0.4.0 documentation
diff --git a/contributor/extending/index.html b/contributor/extending/index.html
index a5acf8bdd1..99da07cda6 100644
--- a/contributor/extending/index.html
+++ b/contributor/extending/index.html
@@ -8,7 +8,7 @@
- Extending Flyte — Flyte 0.3.0 documentation
+ Extending Flyte — Flyte 0.4.0 documentation
diff --git a/contributor/index.html b/contributor/index.html
index 5119e12253..bc8bca91d9 100644
--- a/contributor/index.html
+++ b/contributor/index.html
@@ -8,7 +8,7 @@
- Contributor Docs — Flyte 0.3.0 documentation
+ Contributor Docs — Flyte 0.4.0 documentation
diff --git a/contributor/language/index.html b/contributor/language/index.html
index 4786068ac6..7f494f5d45 100644
--- a/contributor/language/index.html
+++ b/contributor/language/index.html
@@ -8,7 +8,7 @@
- Flyte Specification Language — Flyte 0.3.0 documentation
+ Flyte Specification Language — Flyte 0.4.0 documentation
diff --git a/flyteidl/admin/common.proto.html b/flyteidl/admin/common.proto.html
index 7a2c6d7125..7ece601fbe 100644
--- a/flyteidl/admin/common.proto.html
+++ b/flyteidl/admin/common.proto.html
@@ -8,7 +8,7 @@
- common.proto — Flyte 0.3.0 documentation
+ common.proto — Flyte 0.4.0 documentation
@@ -113,6 +113,7 @@
Represents a structure for notifications based on execution status.
The Notification content is configured within Admin. Future iterations could
expose configuring notifications with custom content.
Label values to be applied to an execution resource.
In the future a mode (e.g. OVERRIDE, APPEND, etc) can be defined
to specify how to merge labels defined at registration and execution time.
Annotation values to be applied to an execution resource.
In the future a mode (e.g. OVERRIDE, APPEND, etc) can be defined
to specify how to merge annotations defined at registration and execution time.
Request to terminate an in-progress execution. This action is irreversible.
If an execution is already terminated, this request will simply be a no-op.
This request will fail if it references a non-existent execution.
@@ -644,14 +649,14 @@
Values computed by the flyte platform after launch plan registration.
These include expected_inputs required to be present in a CreateExecutionRequest
to launch the reference workflow as well timestamp values associated with the launch plan.
(flyteidl.core.ContainerPort) Ports to open in the container. This feature is not supported by all execution engines. (e.g. supported on K8s but
-not supported on AWS Batch)
+not supported on AWS Batch)
+Only K8s
+
+
+
+
data_config
(flyteidl.core.DataLoadingConfig) BETA: Optional configuration for DataLoading. If not specified, then default values are used.
+This makes it possible to to run a completely portable container, that uses inputs and outputs
+only from the local file-system and without having any reference to flyteidl. This is supported only on K8s at the moment.
+If data loading is enabled, then data will be mounted in accompanying directories specified in the DataLoadingConfig. If the directories
+are not specified, inputs will be mounted onto and outputs will be uploaded from a pre-determined file-system path. Refer to the documentation
+to understand the default paths.
+Only K8s
(DEFAULT) All data will be downloaded before the main container is executed
+
+
+
+
DOWNLOAD_STREAM
Data will be downloaded as a stream and an End-Of-Stream marker will be written to indicate all data has been downloaded. Refer to protocol for details
This configuration allows executing raw containers in Flyte using the Flyte CoPilot system.
+Flyte CoPilot, eliminates the needs of flytekit or sdk inside the container. Any inputs required by the users container are side-loaded in the input_path
+Any outputs generated by the user container - within output_path are automatically uploaded.
(bool) Flag enables DataLoading Config. If this is not set, data loading will not be used!
+
+
+
+
input_path
(string) File system path (start at root). This folder will contain all the inputs exploded to a separate file.
+Example, if the input interface needs (x: int, y: blob, z: multipart_blob) and the input path is “/var/flyte/inputs”, then the file system will look like
+/var/flyte/inputs/inputs.<metadata format dependent -> .pb .json .yaml> -> Format as defined previously. The Blob and Multipart blob will reference local filesystem instead of remote locations
+/var/flyte/inputs/x -> X is a file that contains the value of x (integer) in string format
+/var/flyte/inputs/y -> Y is a file in Binary format
+/var/flyte/inputs/z/… -> Note Z itself is a directory
+More information about the protocol - refer to docs #TODO reference docs here
+
+
+
+
output_path
(string) File system path (start at root). This folder should contain all the outputs for the task as individual files and/or an error text file
+
+
+
+
format
(flyteidl.core.DataLoadingConfig.LiteralMapFormat) In the inputs folder, there will be an additional summary/metadata file that contains references to all files or inlined primitive values.
+This format decides the actual encoding for the data. Refer to the encoding to understand the specifics of the contents and the encoding
LiteralMapFormat decides the encoding format in which the input metadata should be made available to the containers.
+If the user has access to the protocol buffer definitions, it is recommended to use the PROTO format.
+JSON and YAML do not need any protobuf definitions to read it
+All remote references in core.LiteralMap are replaced with local filesystem references (the data is downloaded to local filesystem)
+
+
JSON
(DEFAULT) JSON / YAML for the metadata (which contains inlined primitive values). The representation is inline with the standard json specification as specified - https://www.json.org/json-en.html
+
+
+
+
YAML
+
+
+
+
PROTO
Proto is a serialized binary of core.LiteralMap defined in flyteidl/core
Text version: The version identifier of this workflow. Used to distinguish between different iterations
-of tasks with the same name. If any aspect of the underlying workflow definition changes, then the version
-must also change to be accepted by the Flyte Admin Service.
-
-
Param
-
flytekit.models.admin.workflow.WorkflowSpec workflow_spec: This is the actual definition of the workflow
+
flytekit.models.admin.workflow.WorkflowSpec workflow_spec: This is the actual definition of the workflow
that should be created.
In order to register, we have to comply with Admin’s endpoints. Those endpoints take the following objects. These
+flyteidl.admin.launch_plan_pb2.LaunchPlanSpec
+flyteidl.admin.workflow_pb2.WorkflowSpec
+flyteidl.admin.task_pb2.TaskSpec
+
However, if we were to merely call .to_flyte_idl() on all the discovered entities, what we would get are:
+flyteidl.admin.launch_plan_pb2.LaunchPlanSpec
+flyteidl.core.workflow_pb2.WorkflowTemplate
+flyteidl.core.tasks_pb2.TaskTemplate
+
For Workflows and Tasks therefore, there is special logic in the serialize function that translates these objects.
Registerable entities also are required to be serialized. This allows flytekit to separate serialization from
+the network call to Admin (mostly at least, if a Launch Plan is fetched for instance as part of another
+workflow, it will still hit Admin.
+
+
Parameters
+
+
project (Text) – The project in which to serialize this task.
+
domain (Text) – The domain in which to serialize this task.
+
name (Text) – The name to give this task.
+
version (Text) – The version in which to serialize this task.
-flytekit.interfaces.random.random = <random.Random object at 0x1e9a568>¶
+flytekit.interfaces.random.random = <random.Random object at 0x19ca018>¶
An instance of the global random number generator used by flytekit. Flytekit maintains it’s own random instance
to ensure that calls to random.seed(…) do not affect the pseudo-random behavior of flytekit. This random should be
used by flytekit components in all cases where random.random would have been used. Components who want additional
diff --git a/flytekit/flytekit.interfaces.stats.html b/flytekit/flytekit.interfaces.stats.html
index d2c569ad6f..c5373a4e99 100644
--- a/flytekit/flytekit.interfaces.stats.html
+++ b/flytekit/flytekit.interfaces.stats.html
@@ -8,7 +8,7 @@
-
_task_function – this is the decorated method and shouldn’t be declared explicitly. The function must
+take a first argument, and then named arguments matching those defined in @inputs and @outputs. No keyword
+arguments are allowed for wrapped task functions.
+
cache_version (Text) –
[optional] string representing logical version for discovery. This field should be
+updated whenever the underlying algorithm changes.
+
+
Note
+
This argument is required to be a non-empty string if cache is True.
If retries > 0, the task must be able to recover from any remote state created within the user code. It is
+strongly recommended that tasks are written to be idempotent.
+
+
+
interruptible (bool) – [optional] boolean describing if the task is interruptible.
+
deprecated (Text) – [optional] string that should be provided if this task is deprecated. The string
+will be logged as a warning so it should contain information regarding how to update to a newer task.
+
cache (bool) – [optional] boolean describing if the outputs of this task should be cached and
+re-usable.
+
timeout (datetime.timedelta) – [optional] describes how long the task should be allowed to
+run at max before triggering a retry (if retries are enabled). By default, tasks are allowed to run
+indefinitely. If a null timedelta is passed (i.e. timedelta(seconds=0)), the task will not timeout.
+
workers_count (int) – integer determining the number of worker replicas spawned in the cluster for this job
+(in addition to 1 master).
+
per_replica_storage_request (Text) –
[optional] Kubernetes resource string for lower-bound of disk storage space
+for each replica spawned for this job (i.e. both for master and workers). Default is set by platform-level configuration.
+
+
Note
+
This is currently not supported by the platform.
+
+
+
per_replica_cpu_request (Text) –
[optional] Kubernetes resource string for lower-bound of cores for each replica
+spawned for this job (i.e. both for master and workers).
+This can be set to a fractional portion of a CPU. Default is set by platform-level configuration.
+
TODO: Add links to resource string documentation for Kubernetes
+
+
per_replica_gpu_request (Text) –
[optional] Kubernetes resource string for lower-bound of desired GPUs for each
+replica spawned for this job (i.e. both for master and workers).
+Default is set by platform-level configuration.
+
TODO: Add links to resource string documentation for Kubernetes
+
+
per_replica_memory_request (Text) –
[optional] Kubernetes resource string for lower-bound of physical memory
+necessary for each replica spawned for this job (i.e. both for master and workers). Default is set by platform-level configuration.
+
TODO: Add links to resource string documentation for Kubernetes
+
+
per_replica_storage_limit (Text) –
[optional] Kubernetes resource string for upper-bound of disk storage space
+for each replica spawned for this job (i.e. both for master and workers).
+This amount is not guaranteed! If not specified, it is set equal to storage_request.
+
+
Note
+
This is currently not supported by the platform.
+
+
+
per_replica_cpu_limit (Text) – [optional] Kubernetes resource string for upper-bound of cores for each replica
+spawned for this job (i.e. both for master and workers).
+This can be set to a fractional portion of a CPU. This amount is not guaranteed! If not specified,
+it is set equal to cpu_request.
+
per_replica_gpu_limit (Text) – [optional] Kubernetes resource string for upper-bound of desired GPUs for each
+replica spawned for this job (i.e. both for master and workers).
+This amount is not guaranteed! If not specified, it is set equal to gpu_request.
+
per_replica_memory_limit (Text) – [optional] Kubernetes resource string for upper-bound of physical memory
+necessary for each replica spawned for this job (i.e. both for master and workers).
+This amount is not guaranteed! If not specified, it is set equal to memory_request.
+
environment (dict[Text,Text]) – [optional] environment variables to set when executing this task.
+
cls – This can be used to override the task implementation with a user-defined extension. The class
+provided must be a subclass of flytekit.common.tasks.sdk_runnable.SdkRunnableTask. A user can use this to
+inject bespoke logic into the base Flyte programming model.