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_dateThe creation timestamp of the job.
end_dateThe end timestamp of the job.
idThe unique identifier of the job.
job_idThe unique identifier of the job.
job_typeThe type of the job.
metadataMetadata of the SVD.
modelBase embeddings model used for the SVD.
n_componentsNumber of components of the SVD.
progress_counterThe progress counter of the job.
reductionReduction of embeddings used to fit the SVD.
sequence_lengthSequence length constraint of the SVD.
start_dateThe start timestamp of the job.
statusThe current status of the job.
jobsession