openprotein.svd.SVDModel#

class openprotein.svd.SVDModel(session, job=None, metadata=None)[source]#

SVD model that can be used to create reduced embeddings.

The model is also implemented as a Future to allow waiting for a fit job.

Parameters:
  • session (APISession)

  • job (SVDFitJob)

  • metadata (SVDMetadata | None)

__init__(session, job=None, metadata=None)[source]#

Construct the SVD model using either job get or svd metadata get.

Parameters:
  • session (APISession)

  • job (SVDFitJob | None)

  • metadata (SVDMetadata | None)

Methods

__init__(session[, job, metadata])

Construct the SVD model using either job get or svd metadata get.

cancelled()

Check if the job has been cancelled.

create(session[, job_id, job, response])

Create an instance of the appropriate Future class based on the job type.

delete()

Delete this SVD model.

done()

Check if the job has completed.

embed(sequences, **kwargs)

Use this SVD model to get reduced embeddings from input sequences.

fit_gp(assay, properties[, name, description])

Fit a GP on assay using this embedding model and hyperparameters.

fit_umap([sequences, assay, n_components])

Fit an UMAP on the embedding results of this model.

get([verbose])

Retrieve this SVD model itself.

get_inputs()

Get sequences used for svd job.

get_model()

refresh()

Refresh the job status and internal job object.

wait([interval, timeout, verbose])

Wait for the job to complete, then fetch results.

wait_until_done([interval, timeout, verbose])

Wait for the job to complete.

Attributes

created_date

The creation timestamp of the job.

end_date

The end timestamp of the job.

id

The unique identifier of the job.

job_id

The unique identifier of the job.

job_type

The type of the job.

metadata

Metadata of the SVD.

model

Base embeddings model used for the SVD.

n_components

Number of components of the SVD.

progress_counter

The progress counter of the job.

reduction

Reduction of embeddings used to fit the SVD.

sequence_length

Sequence length constraint of the SVD.

start_date

The start timestamp of the job.

status

The current status of the job.

job

session