compute_batch_submit
Batch submit multiple Python functions to a Globus Compute endpoint, each with its own source code and arguments, sharing a common environment and configuration.
Instructions
Submit multiple Python functions as a batch to a Compute endpoint.
Each task in the list provides its own function source code and arguments. All tasks share the same endpoint and requirements/worker_init config.
Args: endpoint_id: UUID of the target Compute endpoint. tasks: List of task dicts, each containing: - 'function_source': Python source code (required) - 'function_name': Name of the function (required) - 'args': Positional arguments (optional, default []) - 'kwargs': Keyword arguments (optional, default {}) requirements: Shared pip requirements for all tasks. python_version: Python version for the remote venv. user_endpoint_config: Additional endpoint configuration.
Returns: Dict with 'task_ids' (list) and 'function_ids' (dict mapping function_name to function UUID).
Examples: compute_batch_submit( endpoint_id="abcd-1234-...", tasks=[ {"function_source": "def f1():\n return 1", "function_name": "f1"}, {"function_source": "def f2(x):\n return x*2", "function_name": "f2", "args": [21]}, ], )
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| endpoint_id | Yes | ||
| tasks | Yes | ||
| requirements | No | ||
| python_version | No | ||
| user_endpoint_config | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||