nucleus.model_weights

The weights artifact attached to a model.

ModelWeights is the metadata users see; the rest of this module is internal machinery for NucleusClient.upload_model_weights() and NucleusClient.download_model_weights().

ModelWeights

Metadata for the weights artifact attached to a model.

class nucleus.model_weights.ModelWeights

Metadata for the weights artifact attached to a model.

model_project_id

Id of the model the artifact belongs to (prj_*).

present

Whether the artifact is available to download. False while an upload is still in progress, or if nothing was ever uploaded.

status

Current state of the artifact, or None if there isn’t one.

size_bytes

Size of the artifact.

original_filename

Filename recorded when the artifact was uploaded.

content_type

Content type recorded when the artifact was uploaded.

download_url

Temporary URL the artifact can be fetched from. Only set when present; prefer NucleusClient.download_model_weights(), which handles this for you.

classmethod from_json(payload)

Instantiate from an API weights payload.

Parameters:

payload (dict)

Return type:

ModelWeights