openprotein.embeddings.OpenProteinModel#
- class openprotein.embeddings.OpenProteinModel(session, model_id, metadata=None)[source]#
Proprietary protein embedding models served by OpenProtein.
Examples
View specific model details (inc supported tokens) with the ? operator.
>>> import openprotein >>> session = openprotein.connect(username="user", password="password") >>> session.embedding.prot_seq?
- Parameters:
session (APISession)
model_id (list[str] | str)
metadata (ModelMetadata | None)
- __init__(session, model_id, metadata=None)#
- Parameters:
session (APISession)
model_id (str)
metadata (ModelMetadata | None)
Methods
__init__(session, model_id[, metadata])attn(sequences, **kwargs)Compute attention embeddings for sequences using this model.
create(session, model_id[, default])Create and return an instance of the appropriate EmbeddingModel subclass based on the model_id.
embed(sequences[, reduction])Embed sequences using this model.
fit_gp(assay, properties, reduction[, name, ...])Fit a Gaussian Process (GP) on an assay using this embedding model and hyperparameters.
fit_svd([sequences, assay, n_components, ...])Fit an SVD on the embedding results of this model.
fit_umap([sequences, assay, n_components, ...])Fit a UMAP on the embedding results of this model.
get_metadata()Get model metadata for this model.
get_model()Get the model_id(s) for this EmbeddingModel subclass.
logits(sequences, **kwargs)Compute logit embeddings for sequences using this model.
Attributes
metadataModelMetadata for this model.
model_id