-
Notifications
You must be signed in to change notification settings - Fork 153
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
1,256 additions
and
1,350 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
docs/developer-guide/api/concrete.ml.common.serialization.decoder.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<!-- markdownlint-disable --> | ||
|
||
<a href="../../../src/concrete/ml/common/serialization/decoder.py#L0"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a> | ||
|
||
# <kbd>module</kbd> `concrete.ml.common.serialization.decoder` | ||
|
||
Custom decoder for serialization. | ||
|
||
## **Global Variables** | ||
|
||
- **ALL_QUANTIZED_OPS** | ||
- **SUPPORTED_TORCH_ACTIVATIONS** | ||
- **USE_SKOPS** | ||
- **TRUSTED_SKOPS** | ||
- **SERIALIZABLE_CLASSES** | ||
|
||
______________________________________________________________________ | ||
|
||
<a href="../../../src/concrete/ml/common/serialization/decoder.py#L100"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a> | ||
|
||
## <kbd>function</kbd> `object_hook` | ||
|
||
```python | ||
object_hook(d: Any) → Any | ||
``` | ||
|
||
Define a custom object hook that enables loading any supported serialized values. | ||
|
||
If the input's type is non-native, then we expect it to have the following format.More information is available in the ConcreteEncoder class. | ||
|
||
**Args:** | ||
|
||
- <b>`d`</b> (Any): The serialized value to load. | ||
|
||
**Returns:** | ||
|
||
- <b>`Any`</b>: The loaded value. | ||
|
||
**Raises:** | ||
|
||
- <b>`NotImplementedError`</b>: If the serialized object does not provides a `dump_dict` method as expected. | ||
|
||
______________________________________________________________________ | ||
|
||
<a href="../../../src/concrete/ml/common/serialization/decoder.py#L221"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a> | ||
|
||
## <kbd>class</kbd> `ConcreteDecoder` | ||
|
||
Custom json decoder to handle non-native types found in serialized Concrete ML objects. | ||
|
||
<a href="../../../src/concrete/ml/common/serialization/decoder.py#L224"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a> | ||
|
||
### <kbd>method</kbd> `__init__` | ||
|
||
```python | ||
__init__(*args, **kwargs) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.