openprotein.embeddings.PoET2Model#
- class openprotein.embeddings.PoET2Model(session, model_id, metadata=None)[source]#
Class for OpenProtein’s foundation model PoET 2.
PoET functions are dependent on a prompt supplied via the prompt endpoints.
Examples
View specific model details (including supported tokens) with the ? operator.
Examples
>>> import openprotein >>> session = openprotein.connect(username="user", password="password") >>> session.embedding.poet2?
- Parameters:
session (APISession)
model_id (list[str] | str)
metadata (ModelMetadata | None)
- __init__(session, model_id, metadata=None)[source]#
- Parameters:
session (APISession)
model_id (str)
metadata (ModelMetadata | None)
Methods
__init__(session, model_id[, metadata])attn()Attention is not available for PoET.
create(session, model_id[, default])Create and return an instance of the appropriate EmbeddingModel subclass based on the model_id.
embed(sequences[, reduction, prompt, query, ...])Embed sequences using this model.
fit_gp(assay, properties[, prompt, query, ...])Fit a Gaussian Process (GP) on assay using this embedding model and hyperparameters.
fit_svd([sequences, assay, n_components, ...])Fit an SVD on the embedding results of PoET.
fit_umap([sequences, assay, n_components, ...])Fit a UMAP on assay using PoET and hyperparameters.
generate(prompt[, query, ...])Generate protein sequences conditioned on a prompt.
get_metadata()Get model metadata for this model.
get_model()Get the model_id(s) for this EmbeddingModel subclass.
indel(sequence[, prompt, query, ...])Score all indels of the query sequence using the specified prompt.
logits(sequences[, prompt, query, ...])Compute logit embeddings for sequences using this model.
score(sequences[, prompt, query, ...])Score query sequences using the specified prompt.
single_site(sequence[, prompt, query, ...])Score all single substitutions of the query sequence using the specified prompt.
Attributes
metadataModelMetadata for this model.
model_id