Skip to content

Commit

Permalink
test(frontend-python): Remove the high p_error in graph evaluation tests
Browse files Browse the repository at this point in the history
  • Loading branch information
BourgerieQuentin committed Aug 2, 2023
1 parent 2c348f6 commit aba6e41
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def evaluate(

pred_results = [node_results[pred] for pred in self.ordered_preds_of(node)]

if p_error > 0.0 and node.converted_to_table_lookup:
if p_error > 0.0 and node.converted_to_table_lookup: # pragma: no cover
variable_input_indices = [
idx
for idx, pred in enumerate(self.ordered_preds_of(node))
Expand Down
4 changes: 2 additions & 2 deletions frontends/concrete-python/tests/compilation/test_circuit.py
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ def f(x, y):

inputset = [(np.random.randint(0, 2**4), np.random.randint(0, 2**5)) for _ in range(2)]
circuit = f.compile(inputset, configuration.fork(fhe_simulation=False, fhe_execution=False))
assert f(*inputset[0]) == circuit.graph(*inputset[0], p_error=0.01)
assert f(*inputset[0]) == circuit.graph(*inputset[0])


def test_circuit_eval_graph_tensor(helpers):
Expand All @@ -503,7 +503,7 @@ def f(x, y):
for _ in range(2)
]
circuit = f.compile(inputset, configuration.fork(fhe_simulation=False, fhe_execution=False))
assert np.all(f(*inputset[0]) == circuit.graph(*inputset[0], p_error=0.01))
assert np.all(f(*inputset[0]) == circuit.graph(*inputset[0]))


def test_circuit_compile_sim_only(helpers):
Expand Down

0 comments on commit aba6e41

Please sign in to comment.