Skip to content

Commit

Permalink
fix: update qgpt2_class.py to fix typo
Browse files Browse the repository at this point in the history
This commit fixes a bug in use_cases_examples/llm/qgpt2_class.py
demo where `simulate` was not called properly.

It raised `TypeError: unsupported operand type(s) for /: 'method' and 'int'`
because `<bound method Circuit.simulate>` was not called.
  • Loading branch information
HugoLB0 authored and fd0r committed Apr 29, 2024
1 parent 2a56030 commit d376d85
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion use_case_examples/llm/qgpt2_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def run_torch(self, inputs: torch.Tensor, fhe: str = "disable", true_float: bool
q_x = np.expand_dims(q_x, axis=0)

if fhe == "simulate":
q_y = self.circuit.simulate
q_y = self.circuit.simulate(q_x)

elif fhe == "execute":
q_y = self.circuit.encrypt_run_decrypt(q_x)
Expand Down

0 comments on commit d376d85

Please sign in to comment.