defines a model file stored in the model repository alongside a ModelInfo.
Attributes
| Name | Type | Description |
|---|---|---|
| full_path | str | absolute path of the file in the repository. |
| path | str | relative file path (e.g. 'trained_model.pkl'). |
| name | str | file name without extension. |
| extension | str | file extension (e.g. 'pkl', 'pt'). |
| last_modified | int | timestamp of last modification. |
| size | int | file size in bytes. |
| content | bytes | array of content bytes. |
Methods
from_json()
load the file metadata from a dict.
| Name | Type | Default | Description |
|---|---|---|---|
| obj | object to load information from. |
to_json()
convert the file metadata to a JSON-compatible dictionary.
return: dict representation.