write

Engine.write_evaluation_key(evaluation_key, file_path)
Saves the evaluation key to the specified path.
  • Input:
    • EvaluationKey
    • file_path: str or pathlib.Path
      • Can be an absolute or relative path.
  • Output:
    • None

Warning

  • The matrix form does not yet support this operation.

Examples

Using an absolute path

from desilofhe import Engine

engine = Engine(bootstrap=True)
secret_key = engine.create_secret_key()
evaluation_key = engine.create_evaluation_key(secret_key)
engine.write_evaluation_key(evaluation_key, "/opt/desilo/evaluation_key")

Using a relative path

from desilofhe import Engine

engine = Engine(bootstrap=True)
secret_key = engine.create_secret_key()
evaluation_key = engine.create_evaluation_key(secret_key)
engine.write_evaluation_key(evaluation_key, "evaluation_key")