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]
- disable_sharing()
Disable all sharing for this model.
Note that the model will still be accessible by users with which related job(s) are shared.
- Return type:
None
- 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
- get_sharing()
Get the list of email addresses of users that this model has been shared with.
- Return type:
List
[str
]
- modify_sharing(add_emails=[], delete_emails=[])
Modifies the list of users that the model is shared with.
If this model was compiled by hub, it will have an associated Compile Job. The associated Compile Job will not be visible unless said Compile Job is also shared.
- Return type:
None