Skip to content

JobSpec is used as both input and output model. Refs https://github.c…#59

Merged
gabor-lbl merged 2 commits intomainfrom
jobspec2
Mar 6, 2026
Merged

JobSpec is used as both input and output model. Refs https://github.c…#59
gabor-lbl merged 2 commits intomainfrom
jobspec2

Conversation

@gabor-lbl
Copy link
Contributor

…om//issues/57

Copy link
Contributor

@juztas juztas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, the current version already splits JobSpec for Input/Output:

Image

And Input Model != Output Model, and they represent two different things. Now I think maybe we should do a separation for Input/Output

queue_name: str|None = Field(default=None, min_length=1, description="Name of the queue or partition to submit the job to", example="debug")
account: str|None = Field(default=None, min_length=1, description="Account or project to charge for resource usage", example="proj123")
reservation_id: str|None = Field(default=None, min_length=1, description="ID of a reservation to use for the job", example="resv-42")
custom_attributes: dict[str, str] = Field(default={}, description="Custom scheduler-specific attributes as key-value pairs", example={"constraint": "gpu"})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we use default_factory=dict where dict is expected?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

image: Annotated[str, Field(min_length=1, description="The container image to use (e.g., 'docker.io/library/ubuntu:latest')", example="docker.io/library/ubuntu:latest")]
volume_mounts: Annotated[list[VolumeMount], Field(description="List of volume mounts for the container")] = []
image: str = Field(min_length=1, description="The container image to use (e.g., 'docker.io/library/ubuntu:latest')", example="docker.io/library/ubuntu:latest")
volume_mounts: list[VolumeMount] = Field(default=[], description="List of volume mounts for the container")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar, should we use default_factory=list?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@gabor-lbl gabor-lbl merged commit eaab4cc into main Mar 6, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants