KubernetesProvider(image, namespace='default', channel=None, nodes_per_block=1, init_blocks=4, min_blocks=0, max_blocks=10, parallelism=1, worker_init='', user_id=None, group_id=None, run_as_non_root=False, secret=None)¶
Kubernetes execution provider :param namespace: Kubernetes namespace to create deployments. :type namespace: str :param image: Docker image to use in the deployment. :type image: str :param channel: Channel for accessing this provider. Possible channels include
- nodes_per_block (int) – Nodes to provision per block.
- init_blocks (int) – Number of blocks to provision at the start of the run. Default is 1.
- min_blocks (int) – Minimum number of blocks to maintain.
- max_blocks (int) – Maximum number of blocks to maintain.
- parallelism (float) – Ratio of provisioned task slots to active tasks. A parallelism value of 1 represents aggressive scaling where as many resources as possible are used; parallelism close to 0 represents the opposite situation in which as few resources as possible (i.e., min_blocks) are used.
- worker_init (str) – Command to be run first for the workers, such as
- secret (str) – Docker secret to use to pull images
- user_id (str) – Unix user id to run the container as.
- group_id (str) – Unix group id to run the container as.
- run_as_non_root (bool) – Run as non-root (True) or run as root (False).
__init__(image, namespace='default', channel=None, nodes_per_block=1, init_blocks=4, min_blocks=0, max_blocks=10, parallelism=1, worker_init='', user_id=None, group_id=None, run_as_non_root=False, secret=None)¶
Initialize self. See help(type(self)) for accurate signature.
__init__(image[, namespace, channel, …])
Cancels the jobs specified by a list of job ids Args: job_ids : [<job_id> …] Returns : [True/False…] : If the cancel operation fails the entire list will be False.
Get the status of a list of jobs identified by the job identifiers returned from the submit request.
submit(cmd_string, blocksize, tasks_per_node)
Submit a job :param - cmd_string: (String) - Name of the container to initiate :param - blocksize: (float) - Number of replicas :param - tasks_per_node: command invocations to be launched per node :type - tasks_per_node: int
The callers of ParslExecutors need to differentiate between Executors and Executors wrapped in a resource provider