client.tool_version
A logical instance of a project or model that will be run many times over.
Attributes
Classes
Represents a logical instance of a project or model that will be run many times over. |
Module Contents
- class client.tool_version.ToolVersion(tool_version_id: int, requester: jobmon.core.requester.Requester | None = None)[source]
Represents a logical instance of a project or model that will be run many times over.
- classmethod get_tool_version(tool: jobmon.client.tool.Tool) ToolVersion[source]
Get a new instance of a ToolVersion from the database.
- Parameters:
tool – a Tool to get a version from.
tool_version_id – tool_version_id to get from the database.
- classmethod from_wire(wire_tuple: Tuple, tool: jobmon.client.tool.Tool) ToolVersion[source]
Convert from the wire format of ToolVersion to an instance.
- Parameters:
wire_tuple – Wire format for ToolVersion defined in jobmon.serializers.
tool – The Tool object to verify the right tool_version based on tool_id.
- load_task_templates() None[source]
Get all task_templates associated with this tool version from the database.
- get_task_template(template_name: str) jobmon.client.task_template.TaskTemplate[source]
Get a single task_template associated with this tool version from the database.
- update_default_compute_resources(cluster_name: str, **kwargs: Any) None[source]
Update default compute resources in place only overridding specified keys.
If no default cluster is specified when this method is called, cluster_name will become the default cluster.
- Parameters:
cluster_name – name of cluster to modify default values for.
**kwargs – any key/value pair you want to update specified as an argument.
- update_default_resource_scales(cluster_name: str, **kwargs: Any) None[source]
Update default resource scales in place only overridding specified keys.
If no default cluster is specified when this method is called, cluster_name will become the default cluster.
- Parameters:
cluster_name – name of cluster to modify default values for.
**kwargs – any key/value pair you want to update specified as an argument.
- set_default_compute_resources_from_dict(cluster_name: str, compute_resources: Dict[str, Any]) None[source]
Set default compute resources for a given cluster_name.
If no default cluster is specified when this method is called, cluster_name will become the default cluster.
- Parameters:
cluster_name – name of cluster to set default values for.
compute_resources – dictionary of default compute resources to run tasks with. Can be overridden at task template or task level. dict of {resource_name: resource_value}
- set_default_resource_scales_from_dict(cluster_name: str, resource_scales: Dict[str, float]) None[source]
Set default resource scales for a given cluster_name.
If no default cluster is specified when this method is called, cluster_name will become the default cluster.
- Parameters:
cluster_name – name of cluster to set default values for.
resource_scales – dictionary of default resource scales to adjust task resources with. Can be overridden at task template or task level. dict of {resource_name: scale_value}