base¶
- class pyrosetta.distributed.cluster.base.TaskBase¶
Bases:
Generic[G]Task objects underpinning PyRosettaCluster.
- _get_seed(protocols: Sized) Optional[str]¶
Get the seed for the input user-provided PyRosetta protocol.
- _get_task_state(protocols: List[Callable[[...], Any]]) Tuple[List[Callable[[...], Any]], Callable[[...], Any], Optional[str]]¶
Given the current state of protocols, returns a tuple of the updated state of protocols and current protocol and seed.
- _setup_initial_kwargs(protocols: List[Callable[[...], Any]], seed: Optional[str], task: Dict[Any, Any]) Tuple[bytes, Dict[str, Any]]¶
Setup the kwargs for the initial task.
- _setup_pyrosetta_init_kwargs(kwargs: Dict[Any, Any]) Dict[str, Any]¶
- _get_clients_index(clients_indices: List[int], protocols: List[Callable[[...], Any]]) int¶
Return the clients index for the current protocol.
- _get_resource(resources: Optional[Union[List[Dict[Any, Any]], Tuple[Dict[Any, Any], ...]]], protocols: List[Callable[[...], Any]]) Optional[Dict[Any, Any]]¶
Return the resource for the current protocol.
- _get_priority(priorities: Optional[Union[List[int], Tuple[int, ...]]], protocols: List[Callable[[...], Any]]) Optional[int]¶
Return the priority for the current protocol.
- _parse_priorities(priorities: Any) Any¶
Parse the priorities keyword argument.
- _setup_kwargs(kwargs: Dict[Any, Any], clients_indices: List[int], resources: Optional[Union[List[Dict[Any, Any]], Tuple[Dict[Any, Any], ...]]], priorities: Optional[Union[List[int], Tuple[int, ...]]]) Tuple[bytes, Dict[str, Any], Callable[[...], Any], int, Optional[Dict[Any, Any]], Optional[int]]¶
Setup the kwargs for the subsequent tasks.
- _setup_seed(kwargs: Dict[Any, Any], seed: Optional[str]) Dict[Any, Any]¶
Setup the ‘options’ or ‘extra_options’ task kwargs with the -run:jran PyRosetta command line flag.
- _setup_protocols_protocol_seed(args: Tuple[Any, ...], protocols: Any, clients_indices: Any, resources: Any, priorities: Any) Tuple[List[Callable[[...], Any]], Callable[[...], Any], Optional[str], int, Optional[Dict[Any, Any]], Optional[int]]¶
Parse, validate, and setup the user-provided PyRosetta protocol(s).
- _is_protocol = False¶
- pyrosetta.distributed.cluster.base.capture_task_metadata(func: M) M¶
Capture a task’s metadata as kwargs.