Add slurm partition eq comparison

This commit is contained in:
Benoît Seignovert 2024-02-19 17:40:57 +01:00
parent 4eef9d7016
commit e8ae32cc86
Signed by: Benoît Seignovert
GPG key ID: F5D8895227D18A0B
2 changed files with 5 additions and 1 deletions

View file

@ -82,6 +82,9 @@ class SlurmPartition:
def __len__(self):
return len(self.nodes)
def __eq__(self, other):
return str(self) == str(other)
@property
def gpus(self) -> str:
"""List of GPUs available."""