Zooming Into Each Step of Demo Run with LatticaAI flow
Installation & Setup
Before you begin, ensure you have the following:
Python 3.10+ installed on your client machine.
Install Lattica query package.
Authentication & Model ID
You need an authentication JWT token to interact with our cloud infrastructure. This token validates your requests and ensures secure communication.
Each public model we run on the cloud has its own unique modelID. The specific modelID for each demo is provided in its corresponding tutorial.
Request an authentication Token: Run the code below.
Store the Token securely for subsequent operations.
Generating & Registering Keys
We supply a class that handles all the local calculations and communications to the LatticaAI server. Initialize this class using the token you obtained.
Our encryption scheme relies on a secret key (which stays on your machine) and an evaluation key (EVK) (sent to LatticaAI cloud server).
Process the requested query
You can now encrypt it and send it securely to the cloud for processing.
The run_query method works in 4 steps:
Prepares your input using the model's preprocessing rules
Takes your secret key to encrypt the data into a secure format
Sends your encrypted data to LatticaAI server and waits for the response
Decrypts what comes back and turns it into a ready-to-use PyTorch tensor
Here are snippets of the inner implementation of run_query method:
Last updated
Was this helpful?