Model
- class Model(owner, model_id, date, model_type, name, metadata, model, verbose, producer)
Neural network model object.
A model should not be constructed directly. It is constructed by the hub client through
qai_hub.upload_model()
,qai_hub.get_model()
, orqai_hub.get_models()
.- model_id
The model ID.
- Type:
str
- date
The time this model was uploaded.
- Type:
datetime
- model_type
The type of the model.
- Type:
- name
An optional user-provided name to identify the model.
- Type:
str
- metadata
Model metadata.
- Type:
Dict[ModelMetadataKey, str]
- download(filename=None)
Downloads source model either to memory or to file.
- Parameters:
filename (
Optional
[str
]) – If filename is specified the model is downloaded to file, otherwise to memory. If the filename doesn’t end with the correct file extension, the appropriate file extension is added to the name.- Returns:
If filename is None, return SourceModel. Otherwise return str.
- Return type:
SourceModel | str
- download_model(filename=None)
Downloads source model to file.
- Return type:
Union
[TopLevelTracedModule
,MLModel
,ModelProto
,bytes
,str
]
Deprecated since version 0.3.0: Please use the ‘download’ API instead.