base_model
mlte/model/base_model.py
Base model implementation for all MLTE models.
BaseModel
Bases: BaseModel
The base model for all MLTE models.
Source code in mlte/model/base_model.py
17 18 19 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 |
|
__eq__(other)
Test instance for equality.
Source code in mlte/model/base_model.py
54 55 56 57 58 |
|
from_json(data)
classmethod
Deserialize a model from data.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data
|
Dict[str, Any]
|
The raw input data |
required |
Returns:
Type | Description |
---|---|
BaseModel
|
A deserialized model instance |
Source code in mlte/model/base_model.py
35 36 37 38 39 40 41 42 |
|
to_json()
Serialize the model. Also check if the result is serializable.
Returns:
Type | Description |
---|---|
Dict[str, Any]
|
The JSON representation of the model |
Source code in mlte/model/base_model.py
20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
|