mirror of
https://github.com/luxfhe/ml-sdk.git
synced 2026-10-30 18:13:04 +00:00
Machine Learning with FHE - fork of Zama Concrete-ML - Built-in FHE-friendly ML models - scikit-learn compatible API - PyTorch model conversion - Quantization-aware training
2.9 KiB
2.9 KiB
module concrete.ml.pandas.client_engine
Define the framework used for managing keys (encrypt, decrypt) for encrypted data-frames.
Global Variables
- CURRENT_API_VERSION
class ClientEngine
Define a framework that manages keys.
method __init__
__init__(keygen: bool = True, keys_path: Optional[Path, str] = None)
method decrypt_to_pandas
decrypt_to_pandas(encrypted_dataframe: EncryptedDataFrame) → DataFrame
Decrypt an encrypted data-frame using the loaded client and return a Pandas data-frame.
Args:
encrypted_dataframe(EncryptedDataFrame): The encrypted data-frame to decrypt.
Returns:
pandas.DataFrame: The Pandas data-frame built on the decrypted values.
method encrypt_from_pandas
encrypt_from_pandas(
pandas_dataframe: DataFrame,
schema: Optional[Dict] = None
) → EncryptedDataFrame
Encrypt a Pandas data-frame using the loaded client.
Args:
pandas_dataframe(DataFrame): The Pandas data-frame to encrypt.schema(Optional[Dict]): The input schema to consider. Default to None.
Returns:
EncryptedDataFrame: The encrypted data-frame.
method keygen
keygen(keys_path: Optional[Path, str] = None)
Generate the keys.
Args:
keys_path(Optional[Union[Path, str]]): The path where to save the keys. Note that if some keys already exist in that path, the client will use them instead of generating new ones. Default to None.