Entity and methods
Model
Bases: MaterialEntity
A class representing a model.
Source code in digitalhub/entities/model/entity/_base.py
ModelMlflow
from_mlflow_run(run_id)
Extract from mlflow run spec for Digitalhub Model.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
run_id
|
str
|
The id of the mlflow run. |
required |
Returns:
Type | Description |
---|---|
dict
|
The extracted spec. |
Source code in digitalhub/entities/model/entity/mlflow.py
model_from_dict(obj)
Create a new object from dictionary.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
obj
|
dict
|
Dictionary to create object from. |
required |
Returns:
Type | Description |
---|---|
Model
|
Object instance. |
Source code in digitalhub/entities/model/builder.py
model_from_parameters(project, name, kind, uuid=None, description=None, labels=None, embedded=True, path=None, **kwargs)
Create a new object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
project
|
str
|
Project name. |
required |
name
|
str
|
Object name. |
required |
kind
|
str
|
Kind the object. |
required |
uuid
|
str
|
ID of the object (UUID4, e.g. 40f25c4b-d26b-4221-b048-9527aff291e2). |
None
|
labels
|
list[str]
|
List of labels. |
None
|
description
|
str
|
Description of the object (human readable). |
None
|
embedded
|
bool
|
Flag to determine if object spec must be embedded in project spec. |
True
|
path
|
str
|
Object path on local file system or remote storage. It is also the destination path of upload() method. |
None
|
**kwargs
|
dict
|
Spec keyword arguments. |
{}
|
Returns:
Type | Description |
---|---|
Model
|
Object instance. |