API
Last updated
Was this helpful?
Last updated
Was this helpful?
: Module for shared data structures and code.
: Check and conversion tools.
: Module for debugging.
: Provide some variants of assert.
: Serialization module.
: Custom decoder for serialization.
: Dump functions for serialization.
: Custom encoder for serialization.
: Load functions for serialization.
: Utils that can be re-used by other pieces of code in the module.
: Module for deployment of the FHE model.
: Methods to deploy a client/server to AWS.
: Methods to deploy a server using Docker.
: APIs for FHE deployment.
: Deployment server.
: Utils.
: ONNX module.
: ONNX conversion related code.
: Utility functions for onnx operator implementations.
: Some code to manipulate models.
: Utils to interpret an ONNX model with numpy.
: ONNX ops implementation in Python + NumPy.
: Module which is used to contain common functions for pytest.
: Torch modules for our pytests.
: Common functions or lists for test files, which can't be put in fixtures.
: Modules for quantization.
: Base Quantized Op class that implements quantization for a float numpy op.
: Post Training Quantization methods.
: QuantizedModule API.
: Quantized versions of the ONNX operators for post training quantization.
: Quantization utilities for a numpy array/tensor.
: Modules for p_error
search.
: p_error binary search for classification and regression tasks.
: Import sklearn models.
: Base classes for all estimators.
: Implement sklearn's Generalized Linear Models (GLM).
: Implement sklearn linear model.
: Scikit-learn interface for fully-connected quantized neural networks.
: Sparse Quantized Neural Network torch module.
: Implement RandomForest models.
: Implement Support Vector Machine.
: Implement DecisionTree models.
: Implements the conversion of a tree model to a numpy function.
: Implements XGBoost models.
: Modules for torch to numpy conversion.
: torch compilation function.
: A torch to numpy module.
: File to manage the version of the package.
: Custom json decoder to handle non-native types found in serialized Concrete ML objects.
: Custom json encoder to handle non-native types found in serialized Concrete ML objects.
: Enum representing the execution mode.
: AWSInstance.
: Client API to encrypt and decrypt FHE data.
: Dev API to save the model and then load and run the FHE circuit.
: Server API to load and run the FHE circuit.
: A mixed quantized-raw valued onnx function.
: Type construct that marks an ndarray as a raw output of a quantized op.
: Torch model with some branching and skip connections.
: Torch model with some branching and skip connections.
: Torch CNN model for the tests.
: Torch CNN model with grouped convolution for compile torch tests.
: Torch CNN model for the tests.
: Torch CNN model for the tests with a max pool.
: Torch CNN model for the tests.
: Torch model that with two different quantizers on the input.
: Torch model for the tests.
: Torch model that should generate MatMul->Add ONNX patterns.
: Torch model that should generate MatMul->Add ONNX patterns.
: Torch model for the tests.
: Torch model to test multiple inputs forward.
: Torch model to test multiple inputs forward.
: Torch model to test multiple inputs with different shape in the forward pass.
: Network that applies two quantized operations on a single input.
: Torch model to test the concat and unsqueeze operators.
: Torch QAT model that does not quantize the inputs.
: Torch model, where we reuse some elements in a loop.
: Torch QAT model that applies various padding patterns.
: Torch model that implements a simple non-uniform quantizer.
: A small quantized network with Brevitas for FashionMNIST classification.
: A small quantized network with Brevitas, trained on make_classification.
: Torch QAT model that reshapes the input.
: Fake torch model used to generate some onnx.
: Torch model implements a step function that needs Greater, Cast and Where.
: Torch model that with a single conv layer that produces the output, eg a blur filter.
: Torch model implements a step function that needs Greater, Cast and Where.
: A very small CNN.
: A very small QAT CNN to classify the sklearn digits data-set.
: A small network with Brevitas, trained on make_classification.
: Torch model to test the ReduceSum ONNX operator in a leveled circuit.
: Torch model to test the ReduceSum ONNX operator in a circuit containing a PBS.
: Torch model that calls univariate and shape functions of torch.
: An operator that mixes (adds or multiplies) together encrypted inputs.
: Base class for quantized ONNX ops implemented in numpy.
: An univariate operator of an encrypted value.
: Base ONNX to Concrete ML computation graph conversion class.
: Post-training Affine Quantization.
: Converter of Quantization Aware Training networks.
: Inference for a quantized model.
: ConstantOfShape operator.
: Gather operator.
: Shape operator.
: Slice operator.
: Quantized Abs op.
: Quantized Addition operator.
: Quantized Average Pooling op.
: Quantized Batch normalization with encrypted input and in-the-clear normalization params.
: Brevitas uniform quantization with encrypted input.
: Cast the input to the required data type.
: Quantized Celu op.
: Quantized clip op.
: Concatenate operator.
: Quantized Conv op.
: Div operator /.
: Quantized Elu op.
: Quantized erf op.
: Quantized Exp op.
: Quantized flatten for encrypted inputs.
: Quantized Floor op.
: Quantized Gemm op.
: Comparison operator >.
: Comparison operator >=.
: Quantized HardSigmoid op.
: Quantized Hardswish op.
: Quantized Identity op.
: Quantized LeakyRelu op.
: Comparison operator <.
: Comparison operator <=.
: Quantized Log op.
: Quantized MatMul op.
: Quantized Max op.
: Quantized Max Pooling op.
: Quantized Min op.
: Multiplication operator.
: Quantized Neg op.
: Quantized Not op.
: Or operator ||.
: Quantized PRelu op.
: Quantized Padding op.
: Quantized pow op.
: ReduceSum with encrypted input.
: Quantized Relu op.
: Quantized Reshape op.
: Quantized round op.
: Quantized Selu op.
: Quantized sigmoid op.
: Quantized Neg op.
: Quantized Softplus op.
: Squeeze operator.
: Subtraction operator.
: Quantized Tanh op.
: Transpose operator for quantized inputs.
: Unsqueeze operator.
: Where operator on quantized arrays.
: Calibration set statistics.
: Options for quantization.
: Abstraction of quantized array.
: Quantization parameters for uniform quantization.
: Uniform quantizer.
: Class for p_error
hyper-parameter search for classification and regression tasks.
: Base class for linear and tree-based classifiers in Concrete ML.
: Base class for all estimators in Concrete ML.
: Mixin class for tree-based classifiers.
: Mixin class for tree-based estimators.
: Mixin class for tree-based regressors.
: Mixin that provides quantization for a torch module and follows the Estimator API.
: A Mixin class for sklearn linear classifiers with FHE.
: A Mixin class for sklearn linear models with FHE.
: A Mixin class for sklearn linear regressors with FHE.
: A Gamma regression model with FHE.
: A Poisson regression model with FHE.
: A Tweedie regression model with FHE.
: An ElasticNet regression model with FHE.
: A Lasso regression model with FHE.
: A linear regression model with FHE.
: A logistic regression model with FHE.
: A Ridge regression model with FHE.
: A Fully-Connected Neural Network classifier with FHE.
: A Fully-Connected Neural Network regressor with FHE.
: Sparse Quantized Neural Network.
: Implements the RandomForest classifier.
: Implements the RandomForest regressor.
: A Classification Support Vector Machine (SVM).
: A Regression Support Vector Machine (SVM).
: Implements the sklearn DecisionTreeClassifier.
: Implements the sklearn DecisionTreeClassifier.
: Implements the XGBoost classifier.
: Implements the XGBoost regressor.
: General interface to transform a torch.nn.Module to numpy module.
: sklearn.utils.check_X_y with an assert.
: sklearn.utils.check_X_y with an assert and multi-output handling.
: sklearn.utils.check_array with an assert.
: Provide a custom assert to check that the condition is False.
: Provide a custom assert to check that a piece of code is never reached.
: Provide a custom assert to check that the condition is True.
: Define a custom object hook that enables loading any supported serialized values.
: Dump any Concrete ML object in a file.
: Dump any object as a string.
: Dump the value into a custom dict format.
: Load any Concrete ML object that provide a load_dict
method.
: Load any Concrete ML object that provide a dump_dict
method.
: Indicate if all unpacked values are of a supported float dtype.
: Indicate if all unpacked values are of a supported integer dtype.
: Indicate if all unpacked values are of the specified dtype(s).
: Convert any allowed type into an array and cast it if required.
: Check the user did not set p_error or global_p_error in configuration.
: Compute the number of bits required to represent x.
: Generate a proxy function for a function accepting only *args type arguments.
: Return the class of the model (instantiated or not), which can be a partial() instance.
: Return the name of the model, which can be a partial() instance.
: Return the ONNX opset_version.
: Check if a model is a Brevitas type.
: Indicate if the model class represents a classifier.
: Indicate if a model class, which can be a partial() instance, is an element of a_list.
: Indicate if the input container is a Pandas DataFrame.
: Indicate if the input container is a Pandas Series.
: Indicate if the input container is a Pandas DataFrame or Series.
: Indicate if the model class represents a regressor.
: Return (p_error, global_p_error) that we want to give to Concrete.
: Sanitize arg_name, replacing invalid chars by _.
: Make the input a tuple if it is not already the case.
: Create a EC2 instance.
: Terminate a AWS EC2 instance.
: Deploy a model to a EC2 AWS instance.
: Deploy a model.
: Terminate a AWS EC2 instance.
: Wait for AWS EC2 instance termination.
: Build server Docker image.
: Delete a Docker image.
: Deploy function.
: Kill all containers that use a given image.
: Filter logs based on previous logs.
: Check if ssh connection is available.
: Wait for connection to be available.
: Get the numpy equivalent forward of the provided ONNX model.
: Get the numpy equivalent forward of the provided torch Module.
: Compute the output shape of a pool or conv operation.
: Compute any additional padding needed to compute pooling layers.
: Pad a tensor according to ONNX spec, using an optional custom pad value.
: Compute the average pooling normalization constant.
: Clean the graph of the onnx model by removing nodes after the given node type.
: Clean the graph of the onnx model by removing nodes at the given node type.
: Keep the outputs given in outputs_to_keep and remove the others from the model.
: Remove identity nodes from a model.
: Remove unnecessary nodes from the ONNX graph.
: Remove unused Constant nodes in the provided onnx model.
: Simplify an ONNX model, removes unused Constant nodes and Identity nodes.
: Execute the provided ONNX graph on the given inputs.
: Get the attribute from an ONNX AttributeProto.
: Construct the qualified type name of the ONNX operator.
: Remove initializers from model inputs.
: Cast values to floating points.
: Compute abs in numpy according to ONNX spec.
: Compute acos in numpy according to ONNX spec.
: Compute acosh in numpy according to ONNX spec.
: Compute add in numpy according to ONNX spec.
: Compute asin in numpy according to ONNX spec.
: Compute sinh in numpy according to ONNX spec.
: Compute atan in numpy according to ONNX spec.
: Compute atanh in numpy according to ONNX spec.
: Compute Average Pooling using Torch.
: Compute the batch normalization of the input tensor.
: Execute ONNX cast in Numpy.
: Compute celu in numpy according to ONNX spec.
: Apply concatenate in numpy according to ONNX spec.
: Return the constant passed as a kwarg.
: Compute cos in numpy according to ONNX spec.
: Compute cosh in numpy according to ONNX spec.
: Compute div in numpy according to ONNX spec.
: Compute elu in numpy according to ONNX spec.
: Compute equal in numpy according to ONNX spec.
: Compute erf in numpy according to ONNX spec.
: Compute exponential in numpy according to ONNX spec.
: Flatten a tensor into a 2d array.
: Compute Floor in numpy according to ONNX spec.
: Compute greater in numpy according to ONNX spec.
: Compute greater in numpy according to ONNX spec and cast outputs to floats.
: Compute greater or equal in numpy according to ONNX spec.
: Compute greater or equal in numpy according to ONNX specs and cast outputs to floats.
: Compute hardsigmoid in numpy according to ONNX spec.
: Compute hardswish in numpy according to ONNX spec.
: Compute identity in numpy according to ONNX spec.
: Compute leakyrelu in numpy according to ONNX spec.
: Compute less in numpy according to ONNX spec.
: Compute less in numpy according to ONNX spec and cast outputs to floats.
: Compute less or equal in numpy according to ONNX spec.
: Compute less or equal in numpy according to ONNX spec and cast outputs to floats.
: Compute log in numpy according to ONNX spec.
: Compute matmul in numpy according to ONNX spec.
: Compute Max in numpy according to ONNX spec.
: Compute Max Pooling using Torch.
: Compute Min in numpy according to ONNX spec.
: Compute mul in numpy according to ONNX spec.
: Compute Negative in numpy according to ONNX spec.
: Compute not in numpy according to ONNX spec.
: Compute not in numpy according to ONNX spec and cast outputs to floats.
: Compute or in numpy according to ONNX spec.
: Compute or in numpy according to ONNX spec and cast outputs to floats.
: Compute pow in numpy according to ONNX spec.
: Compute relu in numpy according to ONNX spec.
: Compute round in numpy according to ONNX spec.
: Compute selu in numpy according to ONNX spec.
: Compute sigmoid in numpy according to ONNX spec.
: Compute Sign in numpy according to ONNX spec.
: Compute sin in numpy according to ONNX spec.
: Compute sinh in numpy according to ONNX spec.
: Compute softmax in numpy according to ONNX spec.
: Compute softplus in numpy according to ONNX spec.
: Compute sub in numpy according to ONNX spec.
: Compute tan in numpy according to ONNX spec.
: Compute tanh in numpy according to ONNX spec.
: Compute thresholdedrelu in numpy according to ONNX spec.
: Transpose in numpy according to ONNX spec.
: Compute the equivalent of numpy.where.
: Compute the equivalent of numpy.where.
: Decorate a numpy onnx function to flag the raw/non quantized inputs.
: Check that the given object can properly be serialized.
: Reduce size of the given data-set.
: Return a random sublist of sklearn_models_and_datasets.
: Get train or testing data-set.
: Instantiate any Concrete ML model type.
: Load an object saved with torch.save() from a file or dict.
: Indicate if two values are equal.
: Convert the n_bits parameter into a proper dictionary.
: Fill a parameter set structure from kwargs parameters.
: Get the quantized module of a given model in FHE, simulated or not.
: Return the list of available linear models in Concrete ML.
: Return the list of available models in Concrete ML.
: Return the list of available neural net models in Concrete ML.
: Return the list of available tree models in Concrete ML.
: Add transpose after last node.
: Create ONNX model with Hummingbird convert method.
: Apply post-processing from the graph.
: Apply pre-processing onto the ONNX graph.
: Convert the tree inference to a numpy functions using Hummingbird.
: Pre-process tree values.
: Workaround to fix torch issue that does not export the proper axis in the ONNX squeeze node.
: Build a quantized module from a Torch or ONNX model.
: Compile a Brevitas Quantization Aware Training model.
: Compile a torch module into a FHE equivalent.
: Compile a torch module into a FHE equivalent.
: Convert a torch tensor or a numpy array to a numpy array.