concrete-numpy
concrete-numpy copied to clipboard
AttributeError: 'FHECircuit' object has no attribute 'encrypt_run_decrypt'
Summary
What happened/what you expected to happen? running of example program
Description
import numpy as np import concrete.numpy as hnp
Function using floating points values converted back to integers at the end
def f(x): return np.fabs(50 * (2 * np.sin(x) * np.cos(x))).astype(np.uint32) # astype is to go back to the integer world
Compiling with x encrypted
compiler = hnp.NPFHECompiler(f, {"x": "encrypted"}) circuit = compiler.compile_on_inputset(range(64))
print(circuit.encrypt_run_decrypt(3) == f(3)) print(circuit.encrypt_run_decrypt(0) == f(0)) print(circuit.encrypt_run_decrypt(1) == f(1)) print(circuit.encrypt_run_decrypt(10) == f(10)) print(circuit.encrypt_run_decrypt(60) == f(60))
print("All good!")
- versions affected:
- python version:
- config (optional: HW, OS): ubuntu
- workaround (optional): if you’ve a way to workaround the issue
- proposed fix (optional): if you’ve a way to fix the issue
Step by step procedure someone should follow to trigger the bug:
minimal POC to trigger the bug
print("Minimal POC to reproduce the bug")
Artifacts
Attach all generated artifacts here (generated in the .artifacts directory by default, see documentation for more detailed instructions).
Logs or output
Hello @bpradeep508 what version of concrete-numpy are you using? (you need 0.5.0 to follow this tutorial)
The examples in README and the docs are updated. They should work with v0.6.0. Please let us know if the issue still exists.