artifact_serializer
serialize_artifact(value_node_id, execution_id, reference, name, storage_backend=None, **kwargs)
Serialize artifact using various backend.
Currently, most objects are using lineapy as the backend for serialization. The only exception is MLflow-supported model flavors. In order to use MLflow for ml model serialization, following conditions need to be satisfied:
- The artifact(ML model) should be a MLflow-supported flavor
- MLflow is installed
storage_backend
should bemlflow
orstorage_backend
isNone
andoptions.get("default_ARTIFACT_STORAGE_BACKEND")=='mlflow'
Parameters:
Name | Type | Description | Default |
---|---|---|---|
value_node_id |
LineaID
|
Value node id in Linea Graph |
required |
execution_id |
LineaID
|
Execution id |
required |
reference |
Any
|
Same as reference in |
required |
name |
str
|
Same as reference in |
required |
storage_backend |
Optional[ARTIFACT_STORAGE_BACKEND]
|
Same as reference in |
None
|
**kwargs |
Same as reference in |
{}
|
Returns:
Type | Description |
---|---|
Dict
|
Dictionary with following key-value pair:
|
Source code in lineapy/api/artifact_serializer.py
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
|