job_spec

Contents

job_spec#

Classes:

Connection

Job input connection details.

Input

Job input connection details.

InputResult

Concrete job input result connection to an output result.

InputSlot

Specification of an input slot in the job configuration.

InputSpec

Input specification.

InputSpecs

Dictionary of input specifications, where each key is the input name.

Inputs

Dictionary of job input connection details, where each key is the input name.

JobBuildError

JobRegisterError

Error that occurs when loading a developer job register.

JobSpec

Job's unique specification details.

Output

Job output details.

OutputRef

Minimal name reference to a specific job output

OutputResult

Concrete job output.

OutputSlot

Specification of an output slot in the job configuration.

OutputSpec

Used for outputs with some generated data based on data forwarded from input inheritance

OutputSpecs

Dictionary of output specifications, where each key is the output name.

Outputs

Dictionary of job output details, where each key is the output name.

Params

Job parameter specifications.

BuilderTag(*args, **kwargs)#

Visual indicators for jobs in the builder.

alias of Literal[‘new’, ‘interactive’, ‘gpuEnabled’, ‘multiGpu’, ‘utility’, ‘import’, ‘live’, ‘benchmark’, ‘wrapper’]

Category(*args, **kwargs)#

Section under which to group a job in the builder.

alias of Literal[‘import’, ‘motion_correction’, ‘ctf_estimation’, ‘exposure_curation’, ‘particle_picking’, ‘extraction’, ‘deep_picker’, ‘particle_curation’, ‘reconstruction’, ‘refinement’, ‘ctf_refinement’, ‘variability’, ‘flexibility’, ‘postprocessing’, ‘local_refinement’, ‘helix’, ‘utilities’, ‘simulations’, ‘live’, ‘instance_testing’, ‘workflows’]

class Connection#

Job input connection details.

Attributes:

job_uid

Connected parent output job uid.

output

Name of output on connected parent output job.

results

Specific results from parent job.

job_uid: str#

Connected parent output job uid.

output: str#

Name of output on connected parent output job.

results: List[InputResult]#

Specific results from parent job. Some slots may have a different job UID.

class Input#

Job input connection details.

Attributes:

connections

Connected output details

count_max

Maximum number of connections supported for this input.

count_min

Minimum number of connections to this input.

description

Detailed description.

repeat_allowed

Whether repeated connections to the same output allowed for this input.

slots

Expected low-level input definitions

title

Human-readable title

type

Cryo-EM native data type, e.g., "exposure", "particle" or "volume"

connections: List[Connection]#

Connected output details

count_max: int | Literal['inf']#

Maximum number of connections supported for this input. Should be any integer >= 0 and <= 500. Inputs with a count_max set to "inf" also support a maximum of 500 connections.

count_min: int#

Minimum number of connections to this input.

description: str#

Detailed description.

repeat_allowed: bool#

Whether repeated connections to the same output allowed for this input.

slots: List[InputSlot]#

Expected low-level input definitions

title: str#

Human-readable title

type: Literal['exposure', 'particle', 'template', 'volume', 'volume_multi', 'mask', 'live', 'ml_model', 'symmetry_candidate', 'flex_mesh', 'flex_model', 'hyperparameter', 'denoise_model', 'annotation_model']#

Cryo-EM native data type, e.g., “exposure”, “particle” or “volume”

class InputResult#

Concrete job input result connection to an output result.

Attributes:

dtype

Datatype-specific string from data_registry.py.

job_uid

Parent job UID source of this input slot connection.

name

Input slot name.

output

Name of output in parent job.

result

Name of output result slot in parent job, e.g., "blob".

version

Version number or specifier to use.

dtype: str#

Datatype-specific string from data_registry.py. e.g., stat_blob, ctf, alignments2D.

job_uid: str#

Parent job UID source of this input slot connection.

name: str | None#

Input slot name. Passthrough slots have name set to None.

output: str#

Name of output in parent job. e.g., “particles”

result: str#

Name of output result slot in parent job, e.g., “blob”. Usually the same as “name” but may differ if there are multiple outputs of the same type

version: int | Literal['F']#

Version number or specifier to use. Usually “F”

class InputSlot#

Specification of an input slot in the job configuration. Each input includes one or more.

Attributes:

dtype

Datatype-specific string from data_registry.py.

name

where to find field in a corresponding .cs file e.g., background_blob

required

whether this field must necessarily exist in acorresponding input/output

dtype: str#

Datatype-specific string from data_registry.py. e.g., stat_blob, ctf, alignments2D.

name: str#

where to find field in a corresponding .cs file e.g., background_blob

required: bool#

whether this field must necessarily exist in acorresponding input/output

class InputSpec#

Input specification. Used to define the expected connections to a job input.

Attributes:

count_max

Maximum number of connections supported for this input.

count_min

Minimum number of connections to this input.

description

Detailed description.

repeat_allowed

Whether repeated connections to the same output allowed for this input.

slots

Expected input/output result slots.

title

Human-readable title

type

Cryo-EM native data type, e.g., "exposure", "particle" or "volume"

count_max: int | Literal['inf']#

Maximum number of connections supported for this input. Should be any integer >= 0 and <= 500. Inputs with a count_max set to "inf" also support a maximum of 500 connections.

count_min: int#

Minimum number of connections to this input.

description: str#

Detailed description.

repeat_allowed: bool#

Whether repeated connections to the same output allowed for this input.

slots: List[InputSlot | str]#

Expected input/output result slots.

“str” is a shortcut for Slot(dtype="str", "prefix="str")

For input specs: “str” is a shortcut for InputSlot(dtype="str", "prefix="str", required=True) “?str” is a shortcut for InputSlot(dtype="str", "prefix="str", required=False)

title: str#

Human-readable title

type: Literal['exposure', 'particle', 'template', 'volume', 'volume_multi', 'mask', 'live', 'ml_model', 'symmetry_candidate', 'flex_mesh', 'flex_model', 'hyperparameter', 'denoise_model', 'annotation_model']#

Cryo-EM native data type, e.g., “exposure”, “particle” or “volume”

class InputSpecs#

Dictionary of input specifications, where each key is the input name.

Attributes:

root

Dictionary of input specifications, where each key is the input name.

root: Dict[str, InputSpec]#

Dictionary of input specifications, where each key is the input name.

class Inputs#

Dictionary of job input connection details, where each key is the input name.

Attributes:

root

Dictionary of job input connection details, where each key is the input name.

root: Dict[str, Input]#

Dictionary of job input connection details, where each key is the input name.

class JobBuildError#

Attributes:

ctx

error context for pydantic

input

value of the invalid property - must be serializable

input_type

loc

path to the invalid property

type

//docs.pydantic.dev/latest/errors/validation_errors

ctx: Dict[str, Any]#

error context for pydantic

input: Any#

value of the invalid property - must be serializable

input_type: str#
loc: List[str | int]#

path to the invalid property

type: Literal['no_such_attribute', 'json_invalid', 'json_type', 'needs_python_object', 'recursion_loop', 'missing', 'frozen_field', 'frozen_instance', 'extra_forbidden', 'invalid_key', 'get_attribute_error', 'model_type', 'model_attributes_type', 'dataclass_type', 'dataclass_exact_type', 'none_required', 'greater_than', 'greater_than_equal', 'less_than', 'less_than_equal', 'multiple_of', 'finite_number', 'too_short', 'too_long', 'iterable_type', 'iteration_error', 'string_type', 'string_sub_type', 'string_unicode', 'string_too_short', 'string_too_long', 'string_pattern_mismatch', 'enum', 'dict_type', 'mapping_type', 'list_type', 'tuple_type', 'set_type', 'set_item_not_hashable', 'bool_type', 'bool_parsing', 'int_type', 'int_parsing', 'int_parsing_size', 'int_from_float', 'float_type', 'float_parsing', 'bytes_type', 'bytes_too_short', 'bytes_too_long', 'bytes_invalid_encoding', 'value_error', 'assertion_error', 'literal_error', 'date_type', 'date_parsing', 'date_from_datetime_parsing', 'date_from_datetime_inexact', 'date_past', 'date_future', 'time_type', 'time_parsing', 'datetime_type', 'datetime_parsing', 'datetime_object_invalid', 'datetime_from_date_parsing', 'datetime_past', 'datetime_future', 'timezone_naive', 'timezone_aware', 'timezone_offset', 'time_delta_type', 'time_delta_parsing', 'frozen_set_type', 'is_instance_of', 'is_subclass_of', 'callable_type', 'union_tag_invalid', 'union_tag_not_found', 'arguments_type', 'missing_argument', 'unexpected_keyword_argument', 'missing_keyword_only_argument', 'unexpected_positional_argument', 'missing_positional_only_argument', 'multiple_argument_values', 'url_type', 'url_parsing', 'url_syntax_violation', 'url_too_long', 'url_scheme', 'uuid_type', 'uuid_parsing', 'uuid_version', 'decimal_type', 'decimal_parsing', 'decimal_max_digits', 'decimal_max_places', 'decimal_whole_digits', 'complex_type', 'complex_str_parsing']#

//docs.pydantic.dev/latest/errors/validation_errors

Type:

values based on https

class JobRegisterError#

Error that occurs when loading a developer job register.

Attributes:

message: str#
traceback: str#
type: str#
class JobSpec#

Job’s unique specification details. Defines the parameters, inputs, outputs and required resources. Contents vary by job type, configured parameters and connected inputs.

Attributes:

inputs

Connected inputs

outputs

Available outputs.

params

Parameters for job, attributes vary per job type.

resource_spec

Compute resource requirements for this job.

type

Job type key, e.g., "import_particles" or "class_2D_new"

ui_tile_height

Number of vertical tiles this job should take in the UI.

ui_tile_width

Number of horizontal tiles this job should take in the UI.

inputs: Inputs#

Connected inputs

outputs: Outputs#

Available outputs. Empty when job has not run.

params: Params#

Parameters for job, attributes vary per job type.

NOTE: After changing a job parameter, the spec may need to be refreshed. Instead of directly modifying this field with job.params.foo = … , use job.set_param(“foo”, …) instead.

resource_spec: ResourceSpec#

Compute resource requirements for this job.

type: str#

Job type key, e.g., “import_particles” or “class_2D_new”

ui_tile_height: int#

Number of vertical tiles this job should take in the UI.

ui_tile_width: int#

Number of horizontal tiles this job should take in the UI.

class Output#

Job output details. Includes saved dataset paths and summary statistics.

Attributes:

description

Detailed description.

image

Asset ID of thumbnail for this output

latest_summary_stats

Additional context-specific summary statistics

num_items

Number of items in final version file

passthrough

Associated passthrough input name

results

All individial outputs based on available output slots

slots

Low-level output result definitions.

summary

Result dataset summary data

title

Human-readable title

type

Cryo-EM native data type, e.g., "exposure", "particle" or "volume"

description: str#

Detailed description.

image: str | None#

Asset ID of thumbnail for this output

latest_summary_stats: Dict[str, Any]#

Additional context-specific summary statistics

num_items: int#

Number of items in final version file

passthrough: str | None#

Associated passthrough input name

results: List[OutputResult]#

All individial outputs based on available output slots

slots: List[OutputSlot]#

Low-level output result definitions.

summary: Dict[str, Any]#

Result dataset summary data

title: str#

Human-readable title

type: Literal['exposure', 'particle', 'template', 'volume', 'volume_multi', 'mask', 'live', 'ml_model', 'symmetry_candidate', 'flex_mesh', 'flex_model', 'hyperparameter', 'denoise_model', 'annotation_model']#

Cryo-EM native data type, e.g., “exposure”, “particle” or “volume”

class OutputRef#

Minimal name reference to a specific job output

Attributes:

job_uid

Connected parent output job uid.

output

Name of output on connected parent output job.

job_uid: str#

Connected parent output job uid.

output: str#

Name of output on connected parent output job.

class OutputResult#

Concrete job output.

Attributes:

dtype

Datatype-specific string from data_registry.py.

metafiles

List of available intermediate result files (same size as versions).

name

where to find field in a corresponding .cs file e.g., background_blob

num_items

Number of rows in each metafile

passthrough

If True, this result is passed through as-is from an associated input.

versions

List of available intermediate result version numbers.

dtype: str#

Datatype-specific string from data_registry.py. e.g., stat_blob, ctf, alignments2D.

metafiles: List[str]#

List of available intermediate result files (same size as versions).

name: str#

where to find field in a corresponding .cs file e.g., background_blob

num_items: List[int]#

Number of rows in each metafile

passthrough: bool#

If True, this result is passed through as-is from an associated input.

versions: List[int]#

List of available intermediate result version numbers.

class OutputSlot#

Specification of an output slot in the job configuration. Each output includes one or more.

Attributes:

dtype

Datatype-specific string from data_registry.py.

name

where to find field in a corresponding .cs file e.g., background_blob

dtype: str#

Datatype-specific string from data_registry.py. e.g., stat_blob, ctf, alignments2D.

name: str#

where to find field in a corresponding .cs file e.g., background_blob

class OutputSpec#

Used for outputs with some generated data based on data forwarded from input inheritance

Attributes:

description

Detailed description.

passthrough

Associated passthrough input name

slots

Expected input/output result slots.

title

Human-readable title

type

Cryo-EM native data type, e.g., "exposure", "particle" or "volume"

description: str#

Detailed description.

passthrough: str | None#

Associated passthrough input name

slots: List[OutputSlot | str]#

Expected input/output result slots.

“str” is a shortcut for Slot(dtype="str", "prefix="str")

For input specs: “str” is a shortcut for InputSlot(dtype="str", "prefix="str", required=True) “?str” is a shortcut for InputSlot(dtype="str", "prefix="str", required=False)

title: str#

Human-readable title

type: Literal['exposure', 'particle', 'template', 'volume', 'volume_multi', 'mask', 'live', 'ml_model', 'symmetry_candidate', 'flex_mesh', 'flex_model', 'hyperparameter', 'denoise_model', 'annotation_model']#

Cryo-EM native data type, e.g., “exposure”, “particle” or “volume”

class OutputSpecs#

Dictionary of output specifications, where each key is the output name.

Attributes:

root

Dictionary of output specifications, where each key is the output name.

root: Dict[str, OutputSpec]#

Dictionary of output specifications, where each key is the output name.

class Outputs#

Dictionary of job output details, where each key is the output name.

Attributes:

root

Dictionary of job output details, where each key is the output name.

root: Dict[str, Output]#

Dictionary of job output details, where each key is the output name.

class Params#

Job parameter specifications. See API function projects.get_job_register for allowed parameters based on job spec type.

Stability(*args, **kwargs)#

Lifecycle/development stage for a job. Jobs will change stabilities as they are continually developed or replaced with other jobs.

alias of Literal[‘develop’, ‘beta’, ‘stable’, ‘legacy’, ‘obsolete’]