pyslurmutils.client.rest.api.v0_0_40.JobDescMsg#
- class pyslurmutils.client.rest.api.v0_0_40.JobDescMsg(**data)[source]#
Bases:
BaseModel
- Parameters:
data (
Any
)
- account: Optional[str]#
- account_gather_frequency: Optional[str]#
- admin_comment: Optional[str]#
- allocation_node_list: Optional[str]#
- allocation_node_port: Optional[int]#
- argv: Optional[List[str]]#
- array: Optional[str]#
- batch_features: Optional[str]#
- begin_time: Optional[Uint64NoVal]#
- burst_buffer: Optional[str]#
- cluster_constraint: Optional[str]#
- clusters: Optional[str]#
- comment: Optional[str]#
- constraints: Optional[str]#
- classmethod construct(_fields_set=None, **values)#
- container: Optional[str]#
- container_id: Optional[str]#
- contiguous: Optional[bool]#
- copy(*, include=None, exclude=None, update=None, deep=False)#
Returns a copy of the model.
- !!! warning “Deprecated”
This method is now deprecated; use model_copy instead.
If you need include or exclude, use:
`python {test="skip" lint="skip"} data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `
- Args:
include: Optional set or mapping specifying which fields to include in the copied model. exclude: Optional set or mapping specifying which fields to exclude in the copied model. update: Optional dictionary of field-value pairs to override field values in the copied model. deep: If True, the values of fields that are Pydantic models will be deep-copied.
- Returns:
A copy of the model with included, excluded and updated fields as specified.
- core_specification: Optional[int]#
- cores_per_socket: Optional[int]#
- cpu_binding: Optional[str]#
- cpu_binding_flags: Optional[List[str]]#
- cpu_frequency: Optional[str]#
- cpus_per_task: Optional[int]#
- cpus_per_tres: Optional[str]#
- crontab: Optional[CronEntry]#
- current_working_directory: Optional[str]#
- deadline: Optional[int]#
- delay_boot: Optional[int]#
- dependency: Optional[str]#
- dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)#
- distribution: Optional[str]#
- distribution_plane_size: Optional[int]#
- end_time: Optional[int]#
- environment: Optional[List[str]]#
- excluded_nodes: Optional[List[str]]#
- exclusive: Optional[List[str]]#
- extra: Optional[str]#
- flags: Optional[List[str]]#
- classmethod from_orm(obj)#
- Parameters:
obj (
Any
)- Return type:
Self
- group_id: Optional[str]#
- hetjob_group: Optional[int]#
- hold: Optional[bool]#
- immediate: Optional[bool]#
- job_id: Optional[int]#
- json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)#
- kill_on_node_fail: Optional[bool]#
- kill_warning_delay: Optional[Uint16NoVal]#
- kill_warning_flags: Optional[List[str]]#
- kill_warning_signal: Optional[str]#
- licenses: Optional[str]#
- mail_type: Optional[List[str]]#
- mail_user: Optional[str]#
- maximum_cpus: Optional[int]#
- maximum_nodes: Optional[int]#
- mcs_label: Optional[str]#
- memory_binding: Optional[str]#
- memory_binding_type: Optional[List[str]]#
- memory_per_cpu: Optional[Uint64NoVal]#
- memory_per_node: Optional[Uint64NoVal]#
- memory_per_tres: Optional[str]#
- minimum_boards_per_node: Optional[int]#
- minimum_cpus: Optional[int]#
- minimum_cpus_per_node: Optional[int]#
- minimum_nodes: Optional[int]#
- minimum_sockets_per_board: Optional[int]#
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- classmethod model_construct(_fields_set=None, **values)#
Creates a new instance of the Model class with validated data.
Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed.
- !!! note
model_construct() generally respects the model_config.extra setting on the provided model. That is, if model_config.extra == ‘allow’, then all extra passed values are added to the model instance’s __dict__ and __pydantic_extra__ fields. If model_config.extra == ‘ignore’ (the default), then all extra passed values are ignored. Because no validation is performed with a call to model_construct(), having model_config.extra == ‘forbid’ does not result in an error if extra values are passed, but they will be ignored.
- Args:
- _fields_set: A set of field names that were originally explicitly set during instantiation. If provided,
this is directly used for the [model_fields_set][pydantic.BaseModel.model_fields_set] attribute. Otherwise, the field names from the values argument will be used.
values: Trusted or pre-validated data dictionary.
- Returns:
A new instance of the Model class with validated data.
- model_copy(*, update=None, deep=False)#
Usage docs: https://docs.pydantic.dev/2.10/concepts/serialization/#model_copy
Returns a copy of the model.
- Args:
- update: Values to change/add in the new model. Note: the data is not validated
before creating the new model. You should trust this data.
deep: Set to True to make a deep copy of the model.
- Returns:
New model instance.
- model_dump(*, mode='python', include=None, exclude=None, context=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True, serialize_as_any=False)#
Usage docs: https://docs.pydantic.dev/2.10/concepts/serialization/#modelmodel_dump
Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.
- Args:
- mode: The mode in which to_python should run.
If mode is ‘json’, the output will only contain JSON serializable types. If mode is ‘python’, the output may contain non-JSON-serializable Python objects.
include: A set of fields to include in the output. exclude: A set of fields to exclude from the output. context: Additional context to pass to the serializer. by_alias: Whether to use the field’s alias in the dictionary key if defined. exclude_unset: Whether to exclude fields that have not been explicitly set. exclude_defaults: Whether to exclude fields that are set to their default value. exclude_none: Whether to exclude fields that have a value of None. round_trip: If True, dumped values should be valid as input for non-idempotent types such as Json[T]. warnings: How to handle serialization errors. False/”none” ignores them, True/”warn” logs errors,
“error” raises a [PydanticSerializationError][pydantic_core.PydanticSerializationError].
serialize_as_any: Whether to serialize fields with duck-typing serialization behavior.
- Returns:
A dictionary representation of the model.
- model_dump_json(*, indent=None, include=None, exclude=None, context=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, round_trip=False, warnings=True, serialize_as_any=False)#
Usage docs: https://docs.pydantic.dev/2.10/concepts/serialization/#modelmodel_dump_json
Generates a JSON representation of the model using Pydantic’s to_json method.
- Args:
indent: Indentation to use in the JSON output. If None is passed, the output will be compact. include: Field(s) to include in the JSON output. exclude: Field(s) to exclude from the JSON output. context: Additional context to pass to the serializer. by_alias: Whether to serialize using field aliases. exclude_unset: Whether to exclude fields that have not been explicitly set. exclude_defaults: Whether to exclude fields that are set to their default value. exclude_none: Whether to exclude fields that have a value of None. round_trip: If True, dumped values should be valid as input for non-idempotent types such as Json[T]. warnings: How to handle serialization errors. False/”none” ignores them, True/”warn” logs errors,
“error” raises a [PydanticSerializationError][pydantic_core.PydanticSerializationError].
serialize_as_any: Whether to serialize fields with duck-typing serialization behavior.
- Returns:
A JSON string representation of the model.
- property model_extra#
Get extra fields set during validation.
- Returns:
A dictionary of extra fields, or None if config.extra is not set to “allow”.
- model_fields: ClassVar[dict[str, FieldInfo]] = {'account': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, title='Account associated with the job'), 'account_gather_frequency': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, title='Job accounting and profiling sampling intervals in seconds'), 'admin_comment': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, title='Arbitrary comment made by administrator'), 'allocation_node_list': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, title='Local node making the resource allocation'), 'allocation_node_port': FieldInfo(annotation=Union[int, NoneType], required=False, default=None, title='Port to send allocation confirmation to'), 'argv': FieldInfo(annotation=Union[List[str], NoneType], required=False, default=None, title='Arguments to the script'), 'array': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, title='Job array index value specification'), 'batch_features': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, title="Features required for batch script's node"), 'begin_time': FieldInfo(annotation=Union[Uint64NoVal, NoneType], required=False, default=None, title='Defer the allocation of the job until the specified time (UNIX timestamp)'), 'burst_buffer': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, title='Burst buffer specifications'), 'cluster_constraint': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, title='Required features that a federated cluster must have to have a sibling job submitted to it'), 'clusters': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, title='Clusters that a federated job can run on'), 'comment': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, title='Arbitrary comment made by user'), 'constraints': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, title='Comma separated list of features that are required'), 'container': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, title='Absolute path to OCI container bundle'), 'container_id': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, title='OCI container ID'), 'contiguous': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None, title='True if job requires contiguous nodes'), 'core_specification': FieldInfo(annotation=Union[int, NoneType], required=False, default=None, title='Specialized core count'), 'cores_per_socket': FieldInfo(annotation=Union[int, NoneType], required=False, default=None, title='Cores per socket required'), 'cpu_binding': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, title='Method for binding tasks to allocated CPUs'), 'cpu_binding_flags': FieldInfo(annotation=Union[List[str], NoneType], required=False, default=None, title='Flags for CPU binding'), 'cpu_frequency': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, title='Requested CPU frequency range <p1>[-p2][:p3]'), 'cpus_per_task': FieldInfo(annotation=Union[int, NoneType], required=False, default=None, title='Number of CPUs required by each task'), 'cpus_per_tres': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, title='Semicolon delimited list of TRES=# values values indicating how many CPUs should be allocated for each specified TRES (currently only used for gres/gpu)'), 'crontab': FieldInfo(annotation=Union[CronEntry, NoneType], required=False, default=None, title='crontab entry'), 'current_working_directory': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, title='Working directory to use for the job'), 'deadline': FieldInfo(annotation=Union[int, NoneType], required=False, default=None, title='Latest time that the job may start (UNIX timestamp)'), 'delay_boot': FieldInfo(annotation=Union[int, NoneType], required=False, default=None, title='Number of seconds after job eligible start that nodes will be rebooted to satisfy feature specification'), 'dependency': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, title='Other jobs that must meet certain criteria before this job can start'), 'distribution': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, title='Layout'), 'distribution_plane_size': FieldInfo(annotation=Union[int, NoneType], required=False, default=None, title='Plane size specification when distribution specifies plane'), 'end_time': FieldInfo(annotation=Union[int, NoneType], required=False, default=None, title='Expected end time (UNIX timestamp)'), 'environment': FieldInfo(annotation=Union[List[str], NoneType], required=False, default=None, title='Environment variables to be set for the job'), 'excluded_nodes': FieldInfo(annotation=Union[List[str], NoneType], required=False, default=None, title='Comma separated list of nodes that may not be used'), 'exclusive': FieldInfo(annotation=Union[List[str], NoneType], required=False, default=None, title='Exclusive'), 'extra': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, title='Arbitrary string used for node filtering if extra constraints are enabled'), 'flags': FieldInfo(annotation=Union[List[str], NoneType], required=False, default=None, title='Job flags'), 'group_id': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, title='Group ID of the user that owns the job'), 'hetjob_group': FieldInfo(annotation=Union[int, NoneType], required=False, default=None, title='Unique sequence number applied to this component of the heterogeneous job'), 'hold': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None, title='Job held'), 'immediate': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None, title='If true, exit if resources are not available within the time period specified'), 'job_id': FieldInfo(annotation=Union[int, NoneType], required=False, default=None, title='Job ID'), 'kill_on_node_fail': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None, title='If true, kill job on node failure'), 'kill_warning_delay': FieldInfo(annotation=Union[Uint16NoVal, NoneType], required=False, default=None, title='Number of seconds before end time to send the warning signal'), 'kill_warning_flags': FieldInfo(annotation=Union[List[str], NoneType], required=False, default=None, title='Flags related to job signals'), 'kill_warning_signal': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, title='Signal to send when approaching end time (e.g. "10" or "USR1")'), 'licenses': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, title='License(s) required by the job'), 'mail_type': FieldInfo(annotation=Union[List[str], NoneType], required=False, default=None, title='Mail event type(s)'), 'mail_user': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, title='User to receive email notifications'), 'maximum_cpus': FieldInfo(annotation=Union[int, NoneType], required=False, default=None, title='Maximum number of CPUs required'), 'maximum_nodes': FieldInfo(annotation=Union[int, NoneType], required=False, default=None, title='Maximum node count'), 'mcs_label': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, title='Multi-Category Security label on the job'), 'memory_binding': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, title='Binding map for map/mask_cpu'), 'memory_binding_type': FieldInfo(annotation=Union[List[str], NoneType], required=False, default=None, title='Method for binding tasks to memory'), 'memory_per_cpu': FieldInfo(annotation=Union[Uint64NoVal, NoneType], required=False, default=None, title='Minimum memory in megabytes per allocated CPU'), 'memory_per_node': FieldInfo(annotation=Union[Uint64NoVal, NoneType], required=False, default=None, title='Minimum memory in megabytes per allocated node'), 'memory_per_tres': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, title='Semicolon delimited list of TRES=# values indicating how much memory in megabytes should be allocated for each specified TRES (currently only used for gres/gpu)'), 'minimum_boards_per_node': FieldInfo(annotation=Union[int, NoneType], required=False, default=None, title='Boards per node required'), 'minimum_cpus': FieldInfo(annotation=Union[int, NoneType], required=False, default=None, title='Minimum number of CPUs required'), 'minimum_cpus_per_node': FieldInfo(annotation=Union[int, NoneType], required=False, default=None, title='Minimum number of CPUs per node'), 'minimum_nodes': FieldInfo(annotation=Union[int, NoneType], required=False, default=None, title='Minimum node count'), 'minimum_sockets_per_board': FieldInfo(annotation=Union[int, NoneType], required=False, default=None, title='Sockets per board required'), 'name': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, title='Job name'), 'network': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, title='Network specs for job step'), 'nice': FieldInfo(annotation=Union[int, NoneType], required=False, default=None, title='Requested job priority change'), 'nodes': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, title='Node count range specification (e.g. 1-15:4)'), 'ntasks_per_tres': FieldInfo(annotation=Union[int, NoneType], required=False, default=None, title='Number of tasks that can access each GPU'), 'open_mode': FieldInfo(annotation=Union[List[str], NoneType], required=False, default=None, title='Open mode used for stdout and stderr files'), 'overcommit': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None, title='Overcommit resources'), 'oversubscribe': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None, title='Oversubscribe'), 'partition': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, title='Partition assigned to the job'), 'power_flags': FieldInfo(annotation=Union[List[Dict[str, Any]], NoneType], required=False, default=None, title='Power Flags'), 'prefer': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, title='Comma separated list of features that are preferred but not required'), 'priority': FieldInfo(annotation=Union[Uint32NoVal, NoneType], required=False, default=None, title='Request specific job priority'), 'profile': FieldInfo(annotation=Union[List[str], NoneType], required=False, default=None, title='Profile used by the acct_gather_profile plugin'), 'qos': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, title='Quality of Service assigned to the job'), 'reboot': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None, title='Node reboot requested before start'), 'requeue': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None, title='Determines whether the job may be requeued'), 'required_nodes': FieldInfo(annotation=Union[List[str], NoneType], required=False, default=None, title='Comma separated list of required nodes'), 'required_switches': FieldInfo(annotation=Union[Uint32NoVal, NoneType], required=False, default=None, title='Maximum number of switches'), 'reservation': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, title='Name of reservation to use'), 'reserve_ports': FieldInfo(annotation=Union[int, NoneType], required=False, default=None, title='Port to send various notification msg to'), 'rlimits': FieldInfo(annotation=Union[JobDescMsgRlimits, NoneType], required=False, default=None, title='Job desc msg rlimits'), 'script': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, title='Job batch script; only the first component in a HetJob is populated or honored'), 'selinux_context': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, title='SELinux context'), 'shared': FieldInfo(annotation=Union[List[str], NoneType], required=False, default=None, title='How the job can share resources with other jobs, if at all'), 'site_factor': FieldInfo(annotation=Union[int, NoneType], required=False, default=None, title='Site-specific priority factor'), 'sockets_per_node': FieldInfo(annotation=Union[int, NoneType], required=False, default=None, title='Sockets per node required'), 'spank_environment': FieldInfo(annotation=Union[List[str], NoneType], required=False, default=None, title='Environment variables for job prolog/epilog scripts as set by SPANK plugins'), 'standard_error': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, title='Path to stderr file'), 'standard_input': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, title='Path to stdin file'), 'standard_output': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, title='Path to stdout file'), 'tasks': FieldInfo(annotation=Union[int, NoneType], required=False, default=None, title='Number of tasks'), 'tasks_per_board': FieldInfo(annotation=Union[int, NoneType], required=False, default=None, title='Number of tasks to invoke on each board'), 'tasks_per_core': FieldInfo(annotation=Union[int, NoneType], required=False, default=None, title='Number of tasks to invoke on each core'), 'tasks_per_node': FieldInfo(annotation=Union[int, NoneType], required=False, default=None, title='Number of tasks to invoke on each node'), 'tasks_per_socket': FieldInfo(annotation=Union[int, NoneType], required=False, default=None, title='Number of tasks to invoke on each socket'), 'temporary_disk_per_node': FieldInfo(annotation=Union[int, NoneType], required=False, default=None, title='Minimum tmp disk space required per node'), 'thread_specification': FieldInfo(annotation=Union[int, NoneType], required=False, default=None, title='Specialized thread count'), 'threads_per_core': FieldInfo(annotation=Union[int, NoneType], required=False, default=None, title='Threads per core required'), 'time_limit': FieldInfo(annotation=Union[Uint32NoVal, NoneType], required=False, default=None, title='Maximum run time in minutes'), 'time_minimum': FieldInfo(annotation=Union[Uint32NoVal, NoneType], required=False, default=None, title='Minimum run time in minutes'), 'tres_bind': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, title='Task to TRES binding directives'), 'tres_freq': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, title='TRES frequency directives'), 'tres_per_job': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, title='Comma separated list of TRES=# values to be allocated for every job'), 'tres_per_node': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, title='Comma separated list of TRES=# values to be allocated for every node'), 'tres_per_socket': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, title='Comma separated list of TRES=# values to be allocated for every socket'), 'tres_per_task': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, title='Comma separated list of TRES=# values to be allocated for every task'), 'user_id': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, title='User ID that owns the job'), 'wait_all_nodes': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None, title='If true, wait to start until after all nodes have booted'), 'wait_for_switch': FieldInfo(annotation=Union[int, NoneType], required=False, default=None, title='Maximum time to wait for switches in seconds'), 'wckey': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, title='Workload characterization key'), 'x11': FieldInfo(annotation=Union[List[str], NoneType], required=False, default=None, title='X11 forwarding options'), 'x11_magic_cookie': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, title='Magic cookie for X11 forwarding'), 'x11_target_host': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, title='Hostname or UNIX socket if x11_target_port=0'), 'x11_target_port': FieldInfo(annotation=Union[int, NoneType], required=False, default=None, title='TCP port')}#
- property model_fields_set: set[str]#
Returns the set of fields that have been explicitly set on this model instance.
- Returns:
- A set of strings representing the fields that have been set,
i.e. that were not filled from defaults.
- classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation')#
Generates a JSON schema for a model class.
- Args:
by_alias: Whether to use attribute aliases or not. ref_template: The reference template. schema_generator: To override the logic used to generate the JSON schema, as a subclass of
GenerateJsonSchema with your desired modifications
mode: The mode in which to generate the schema.
- Returns:
The JSON schema for the given model class.
- Parameters:
by_alias (
bool
)ref_template (
str
)schema_generator (
type
[GenerateJsonSchema
])mode (
Literal
['validation'
,'serialization'
])
- Return type:
dict
[str
,Any
]
- classmethod model_parametrized_name(params)#
Compute the class name for parametrizations of generic classes.
This method can be overridden to achieve a custom naming scheme for generic BaseModels.
- Args:
- params: Tuple of types of the class. Given a generic class
Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.
- Returns:
String representing the new class where params are passed to cls as type variables.
- Raises:
TypeError: Raised when trying to generate concrete names for non-generic models.
- Parameters:
params (
tuple
[type
[Any
],...
])- Return type:
str
- model_post_init(_BaseModel__context)#
Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.
- Parameters:
_BaseModel__context (
Any
)- Return type:
None
- classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)#
Try to rebuild the pydantic-core schema for the model.
This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.
- Args:
force: Whether to force the rebuilding of the model schema, defaults to False. raise_errors: Whether to raise errors, defaults to True. _parent_namespace_depth: The depth level of the parent namespace, defaults to 2. _types_namespace: The types namespace, defaults to None.
- Returns:
Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.
- classmethod model_validate(obj, *, strict=None, from_attributes=None, context=None)#
Validate a pydantic model instance.
- Args:
obj: The object to validate. strict: Whether to enforce types strictly. from_attributes: Whether to extract data from object attributes. context: Additional context to pass to the validator.
- Raises:
ValidationError: If the object could not be validated.
- Returns:
The validated model instance.
- classmethod model_validate_json(json_data, *, strict=None, context=None)#
Usage docs: https://docs.pydantic.dev/2.10/concepts/json/#json-parsing
Validate the given JSON data against the Pydantic model.
- Args:
json_data: The JSON data to validate. strict: Whether to enforce types strictly. context: Extra variables to pass to the validator.
- Returns:
The validated Pydantic model.
- Raises:
ValidationError: If json_data is not a JSON string or the object could not be validated.
- classmethod model_validate_strings(obj, *, strict=None, context=None)#
Validate the given object with string data against the Pydantic model.
- Args:
obj: The object containing string data to validate. strict: Whether to enforce types strictly. context: Extra variables to pass to the validator.
- Returns:
The validated Pydantic model.
- name: Optional[str]#
- network: Optional[str]#
- nice: Optional[int]#
- nodes: Optional[str]#
- ntasks_per_tres: Optional[int]#
- open_mode: Optional[List[str]]#
- overcommit: Optional[bool]#
- oversubscribe: Optional[bool]#
- classmethod parse_file(path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)#
- classmethod parse_obj(obj)#
- Parameters:
obj (
Any
)- Return type:
Self
- classmethod parse_raw(b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)#
- partition: Optional[str]#
- power_flags: Optional[List[Dict[str, Any]]]#
- prefer: Optional[str]#
- priority: Optional[Uint32NoVal]#
- profile: Optional[List[str]]#
- qos: Optional[str]#
- reboot: Optional[bool]#
- requeue: Optional[bool]#
- required_nodes: Optional[List[str]]#
- required_switches: Optional[Uint32NoVal]#
- reservation: Optional[str]#
- reserve_ports: Optional[int]#
- rlimits: Optional[JobDescMsgRlimits]#
- classmethod schema(by_alias=True, ref_template='#/$defs/{model}')#
- Parameters:
by_alias (
bool
)ref_template (
str
)
- Return type:
Dict
[str
,Any
]
- classmethod schema_json(*, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)#
- Parameters:
by_alias (
bool
)ref_template (
str
)dumps_kwargs (
Any
)
- Return type:
str
- script: Optional[str]#
- selinux_context: Optional[str]#
- site_factor: Optional[int]#
- sockets_per_node: Optional[int]#
- spank_environment: Optional[List[str]]#
- standard_error: Optional[str]#
- standard_input: Optional[str]#
- standard_output: Optional[str]#
- tasks: Optional[int]#
- tasks_per_board: Optional[int]#
- tasks_per_core: Optional[int]#
- tasks_per_node: Optional[int]#
- tasks_per_socket: Optional[int]#
- temporary_disk_per_node: Optional[int]#
- thread_specification: Optional[int]#
- threads_per_core: Optional[int]#
- time_limit: Optional[Uint32NoVal]#
- time_minimum: Optional[Uint32NoVal]#
- tres_bind: Optional[str]#
- tres_freq: Optional[str]#
- tres_per_job: Optional[str]#
- tres_per_node: Optional[str]#
- tres_per_socket: Optional[str]#
- tres_per_task: Optional[str]#
- classmethod update_forward_refs(**localns)#
- Parameters:
localns (
Any
)- Return type:
None
- user_id: Optional[str]#
- classmethod validate(value)#
- Parameters:
value (
Any
)- Return type:
Self
- wait_all_nodes: Optional[bool]#
- wait_for_switch: Optional[int]#
- wckey: Optional[str]#
- x11: Optional[List[str]]#
- x11_magic_cookie: Optional[str]#
- x11_target_host: Optional[str]#
- x11_target_port: Optional[int]#