Skip to content

Commit

Permalink
chore(frontend-python): Regenerate keyset on error
Browse files Browse the repository at this point in the history
  • Loading branch information
BourgerieQuentin committed Jan 2, 2024
1 parent afb9420 commit 9a8b644
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions frontends/concrete-python/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

import numpy as np
import pytest
import warnings

import tests
from concrete import fhe
Expand Down Expand Up @@ -302,6 +303,9 @@ def sanitize(values):
if all(np.array_equal(e, a) for e, a in zip(expected, actual)):
break

warnings.warn(UserWarning(f'Test fail ({i+1}/{retries}), regenerate keyset and retry'))
circuit.keygen(force=True, seed=i+1)

if i == retries - 1:
message = f"""
Expand Down

0 comments on commit 9a8b644

Please sign in to comment.