System Args
These arguments have defaults for every job type. They can be overwritten (via submission_arg_overrides) as described in the Introduction. Not all apply to every job type, e.g. python tasks do not use the java_* arguments and locally run tasks do not use the ecs_* arguments.
SubmissionArgs is the submitter-side config (ECS sizing, job definition, queue/compute env); TaskRuntimeArgs is the per-task context shipped to the worker. See ADR-0009.
SubmissionArgs
¶
Bases: BaseModel
Config the local submitter uses to shape and submit the AWS Batch job.
Declared per task module (see each module's default_submission_args) and read only on the
submitter side (build_tasks / job_runner / the task factories / get_ecs_job_config). It is NOT
serialized to the worker — the worker gets a TaskRuntimeArgs instead. Splitting these apart keeps
submission-only fields out of the worker's validation surface (see
docs/architecture/adr/0009-submission-vs-runtime-args.md).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
task_language
|
TaskLanguage
|
|
required |
java_threads
|
int | None
|
|
None
|
jvm_heap_max
|
int | None
|
|
None
|
ecs_max_job_time_min
|
int
|
|
required |
ecs_memory
|
int
|
|
required |
ecs_vcpu
|
int
|
|
required |
ecs_job_definition
|
str
|
|
'runzi-fargate-JD'
|
ecs_job_queue
|
str | None
|
|
None
|
ecs_compute_environment
|
ComputeEnvironment | None
|
|
None
|
ecs_extra_env
|
list[BatchEnvironmentSetting] | None
|
|
None
|
Attributes¶
task_language: TaskLanguage
instance-attribute
¶
java_threads: int | None = None
class-attribute
instance-attribute
¶
jvm_heap_max: int | None = None
class-attribute
instance-attribute
¶
ecs_max_job_time_min: int
instance-attribute
¶
ecs_memory: int
instance-attribute
¶
ecs_vcpu: int
instance-attribute
¶
ecs_job_definition: str = DEFAULT_JOB_DEFINITION
class-attribute
instance-attribute
¶
ecs_job_queue: str | None = None
class-attribute
instance-attribute
¶
ecs_compute_environment: ComputeEnvironment | None = None
class-attribute
instance-attribute
¶
ecs_extra_env: list[BatchEnvironmentSetting] | None = None
class-attribute
instance-attribute
¶
resolved_job_queue: str
property
¶
The job queue to submit to: the explicit override, else the one the job definition selects.
resolved_compute_environment: ComputeEnvironment | str
property
¶
The compute-environment type: the explicit override, else the one the job definition selects.
May be a raw string when set via submission_arg_overrides' setattr path (which bypasses pydantic coercion); get_ecs_job_config tolerates both the enum and the string.
TaskRuntimeArgs
¶
Bases: BaseModel
Per-task context the worker needs at execution time.
Assembled by the submitter (build_tasks) and serialized to the worker under the
task_runtime_args config key; the worker rebuilds it in each task module's __main__. This
is the only args model that crosses the submitter->worker boundary, so it must stay small and
evolve compatibly with deployed images (see docs/architecture/adr/0009-submission-vs-runtime-args.md).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
general_task_id
|
str | None
|
|
None
|
task_count
|
int
|
|
0
|
use_api
|
bool
|
|
required |
java_threads
|
int | None
|
Java thread count the worker applies (setNumThreads / PBS ppn). Java tasks only. |
None
|
allocated_vcpu
|
int | None
|
The container's requested vCPU (= SubmissionArgs.ecs_vcpu), derived by build_tasks. OpenQuake tasks cap their processpool to this so they don't over-detect the host's cores and OOM on Batch EC2 (ADR-0012). |
None
|
Attributes¶
general_task_id: str | None = None
class-attribute
instance-attribute
¶
task_count: int = 0
class-attribute
instance-attribute
¶
use_api: bool
instance-attribute
¶
java_threads: int | None = None
class-attribute
instance-attribute
¶
Java thread count the worker applies (setNumThreads / PBS ppn). Java tasks only.
allocated_vcpu: int | None = None
class-attribute
instance-attribute
¶
The container's requested vCPU (= SubmissionArgs.ecs_vcpu), derived by build_tasks. OpenQuake tasks cap their processpool to this so they don't over-detect the host's cores and OOM on Batch EC2 (ADR-0012).
java_gateway_port: int
property
¶
The py4j gateway port, read from NZSHM22_APP_PORT at runtime.
The port belongs to the JVM process, not the submitter: whichever launcher starts the gateway exports NZSHM22_APP_PORT (a free port per container on AWS Batch, where forced host networking makes a fixed port collide across concurrent jobs; the per-task port in the generated bash script on LOCAL/CLUSTER). Reading it here — rather than shipping it in the config — keeps the JVM and the Python client on the same port with a single source of truth.