chore(ci): small fixes on data_extractor filename generation

This is done to ease automated SVG tables for tfhe-rs public documentation.
This commit is contained in:
David Testé
2025-11-05 16:05:33 +01:00
committed by David Testé
parent a75b5107ff
commit 3c76dd8cad
3 changed files with 15 additions and 4 deletions

View File

@@ -238,6 +238,9 @@ class ErrorFailureProbability(enum.IntEnum):
f"error failure probability str conversion '{self}' not supported yet"
)
def __str__(self):
return self.to_str()
class BenchType(enum.Enum):
Latency = 0

View File

@@ -313,7 +313,10 @@ def perform_data_extraction(
conversion_func,
)
file_suffix = f"_{operand_type.lower()}"
if layer != Layer.CoreCrypto:
file_suffix = f"-{operand_type.lower()}"
else:
file_suffix = ""
filename = utils.append_suffix_to_filename(output_filename, file_suffix, ".csv")
utils.write_to_csv(
@@ -332,8 +335,10 @@ def perform_data_extraction(
for array in generic_arrays:
metadata_suffix = ""
if array.metadata:
for key, value in array.metadata.items():
metadata_suffix += f"_{key}_{value}"
for value in array.metadata.values():
# In recent Python, dict keep insert order.
# This call won't change metadata order in the suffix between runs.
metadata_suffix += f"-{value}".lower()
current_suffix = file_suffix + metadata_suffix

View File

@@ -508,7 +508,10 @@ class GenericFormatter:
BenchArray(
array,
self.layer,
metadata={"pfail": key.pfail, "noise": key.noise_distribution},
metadata={
"noise": key.noise_distribution,
"pfail": key.pfail,
},
)
)