Resource Spec¶
Resource Specification.
-
class
ResourceSpec(resource_file=None)[source]¶ Bases:
objectResource Spec.
Contains node and SSH information found by parsing a resource_spec.yml.
- # TODO: Make it a real Graph (a clique), with edge weights being network bandwidth.
This would allow for even more intelligent strategy generation.
-
class
DeviceSpec(host_address, host_device=None, device_type=<DeviceType.CPU: 0>, device_index=None)[source]¶ Bases:
objectDevice specification.
-
class
SSHConfig(username: str, port: int, python_venv: str, key_file: str, pkey: Optional[paramiko.rsakey.RSAKey], env: dict)[source]¶ Bases:
tupleContains any necessary SSH information (e.g. passwords, keyfiles, etc.).
-
class
SSHConfigMap(info: Dict[str, Dict], node_groups: Dict[str, str], gpu_devices: Dict[str, str])[source]¶ Bases:
dictContains all necessary SSH configs, grouped by config name.
-
fromkeys(value=None, /)[source]¶ Create a new dictionary with keys from iterable and values set to value.
-
get(key, default=None, /)[source]¶ Return the value for key if key is in the dictionary, else default.
-
pop(k[, d]) → v, remove specified key and return the corresponding value.[source]¶ If key is not found, d is returned if given, otherwise KeyError is raised
-
popitem() → (k, v), remove and return some (key, value) pair as a[source]¶ 2-tuple; but raise KeyError if D is empty.
-
setdefault(key, default=None, /)[source]¶ Insert key with a value of default if key is not in the dictionary.
Return the value for key if key is in the dictionary, else default.
-