Create an MLModelAsset instance from in-memory data. Parameters ---------- spec_data : bytes The specification data of the model. blob_mapping : Dict[str, bytes]) A dictionary with blob path as the key and blob data as the value.
(
cls,
spec_data: bytes,
blob_mapping: _Dict[str, bytes] = {},
)
| 283 | |
| 284 | @classmethod |
| 285 | def from_memory( |
| 286 | cls, |
| 287 | spec_data: bytes, |
| 288 | blob_mapping: _Dict[str, bytes] = {}, |
| 289 | ) -> "MLModelAsset": |
| 290 | """ |
| 291 | Create an MLModelAsset instance from in-memory data. |
| 292 | |
| 293 | Parameters |
| 294 | ---------- |
| 295 | spec_data : bytes |
| 296 | The specification data of the model. |
| 297 | |
| 298 | blob_mapping : Dict[str, bytes]) |
| 299 | A dictionary with blob path as the key and blob data as the value. |
| 300 | |
| 301 | Returns |
| 302 | ------- |
| 303 | MLModelAsset |
| 304 | An instance of MLModelAsset created from the provided memory data. |
| 305 | """ |
| 306 | return _MLModelProxy.create_model_asset_from_memory(spec_data, blob_mapping) |
| 307 | |
| 308 | class MLModel: |
| 309 | """ |
no outgoing calls