discover#

parse_resource_info(output: str) dict[str, int] | None#

Parses the output from flux resource info and returns a dictionary of resource values.

The expected output format is “1 Nodes, 32 Cores, 1 GPUs”.

Returns:

A dictionary containing the resource values with the following keys:
  • nodes (int): The number of nodes.

  • cpu (int): The number of CPU cores.

  • gpu (int): The number of GPU devices.

Return type:

dict

read_resource_info() dict[str, Any] | None#