refactor: move configuration and artifacts to compile and trace methods

This commit is contained in:
Umut
2022-04-28 13:01:59 +02:00
parent cc726154b6
commit ffe26aadcb
25 changed files with 256 additions and 186 deletions

View File

@@ -121,11 +121,11 @@ import pathlib
artifacts = cnp.DebugArtifacts("/tmp/custom/export/path")
@cnp.compiler({"x": "encrypted"}, artifacts=artifacts)
@cnp.compiler({"x": "encrypted"})
def f(x):
return 127 - (50 * (np.sin(x) + 1)).astype(np.int64)
f.compile(range(2 ** 3))
f.compile(range(2 ** 3), artifacts=artifacts)
artifacts.export()
```