Add slurm cluster and partition len property
This commit is contained in:
parent
fc54701400
commit
4eef9d7016
2 changed files with 10 additions and 0 deletions
|
@ -79,6 +79,9 @@ class SlurmPartition:
|
|||
def __iter__(self):
|
||||
return iter(self.nodes)
|
||||
|
||||
def __len__(self):
|
||||
return len(self.nodes)
|
||||
|
||||
@property
|
||||
def gpus(self) -> str:
|
||||
"""List of GPUs available."""
|
||||
|
@ -108,6 +111,9 @@ class SlurmCluster:
|
|||
def __iter__(self):
|
||||
return iter(self.partitions)
|
||||
|
||||
def __len__(self):
|
||||
return len(self.partitions)
|
||||
|
||||
def __eq__(self, other):
|
||||
return str(self) == str(other)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue