Skip to content

Commit

Permalink
chore: simply the fit's run
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanBredehoft committed May 29, 2024
1 parent afca943 commit bedb72c
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions src/concrete/ml/sklearn/linear_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -633,20 +633,9 @@ def _fit_encrypted(

# If the training is done in FHE, execute the underlying FHE circuit directly on the
# encrypted values
if fhe == "execute":
weights_enc, bias_enc = self.training_quantized_module.fhe_circuit.run(
X_batch_enc_i,
y_batch_enc_i,
weights_enc,
bias_enc,
)

# Else, use the quantized module on the quantized values (works for both quantized
# clear and FHE simulation modes)
else:
weights_enc, bias_enc = self.training_quantized_module.quantized_forward(
X_batch_enc_i, y_batch_enc_i, weights_enc, bias_enc, fhe=fhe
)
weights_enc, bias_enc = self.training_quantized_module.quantized_forward(
X_batch_enc_i, y_batch_enc_i, weights_enc, bias_enc, fhe=fhe
)

if self.verbose:
print(
Expand Down

0 comments on commit bedb72c

Please sign in to comment.