Skip to content

Commit

Permalink
chore: fix test rounding_threshold_bits (#643)
Browse files Browse the repository at this point in the history
  • Loading branch information
jfrery authored Apr 23, 2024
1 parent 3405978 commit 22c9720
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/concrete/ml/common/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,8 @@ def process_rounding_threshold_bits(rounding_threshold_bits):
valid_keys = {"n_bits", "method"}
if not valid_keys.issuperset(rounding_threshold_bits.keys()):
raise KeyError(
f"Invalid keys in rounding_threshold_bits. Allowed keys are {valid_keys}."
f"Invalid keys in rounding_threshold_bits. "
f"Allowed keys are {sorted(valid_keys)}."
)
n_bits_rounding = rounding_threshold_bits.get("n_bits")
if n_bits_rounding == "auto":
Expand Down
2 changes: 1 addition & 1 deletion tests/torch/test_compile_torch.py
Original file line number Diff line number Diff line change
Expand Up @@ -1423,7 +1423,7 @@ def forward(self, x):
(
{"invalid_key": 4},
KeyError,
"Invalid keys in rounding_threshold_bits. Allowed keys are {'n_bits', 'method'}.",
"Invalid keys in rounding_threshold_bits. Allowed keys are \\['method', 'n_bits'\\].",
),
(
{"n_bits": "not_an_int"},
Expand Down

0 comments on commit 22c9720

Please sign in to comment.