in optimum_benchmark/trackers/memory.py [0:0]
def to_plain_text(self) -> str:
plain_text = ""
if self.max_ram is not None:
plain_text += "\t\t+ max_ram: {max_ram:.2f} ({unit})\n"
if self.max_global_vram is not None:
plain_text += "\t\t+ max_global_vram: {max_global_vram:.2f} ({unit})\n"
if self.max_process_vram is not None:
plain_text += "\t\t+ max_process_vram: {max_process_vram:.2f} ({unit})\n"
if self.max_reserved is not None:
plain_text += "\t\t+ max_reserved: {max_reserved:.2f} ({unit})\n"
if self.max_allocated is not None:
plain_text += "\t\t+ max_allocated: {max_allocated:.2f} ({unit})\n"
return plain_text.format(**asdict(self))