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
- client.tool_version.logger
- class client.tool_version.ToolVersion(tool_version_id: int, requester: jobmon.core.requester.Requester | None = None)
Represents a logical instance of a project or model that will be run many times over.
Instantiate a tool version.
- Parameters:
tool_version_id – an integer id associated with a Tool
requester – communicate with the FastApi services.
- id
- requester = None
- classmethod get_tool_version(tool: jobmon.client.tool.Tool) ToolVersion
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
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.
- property tool: jobmon.client.tool.Tool
The Tool this ToolVersion is associated with.
- load_task_templates() None
Get all task_templates associated with this tool version from the database.
- get_task_template(template_name: str) jobmon.client.task_template.TaskTemplate
Get a single task_template associated with this tool version from the database.
- update_default_compute_resources(cluster_name: str, **kwargs: Any) None
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
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
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
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}