openprotein.embeddings.PoETModel#
- class openprotein.embeddings.PoETModel(session, model_id, metadata=None)[source]#
Class for OpenProtein’s foundation model PoET.
Note
PoET functions are dependent on a prompt supplied via the prompt endpoints.
Examples
View specific model details (including supported tokens) with the ? operator.
>>> import openprotein >>> session = openprotein.connect(username="user", password="password") >>> session.embedding.poet.<embeddings_method>
- 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[, prompt, reduction])Embed sequences using the PoET model.
fit_gp(assay, properties[, prompt])Fit a Gaussian Process (GP) on assay using this embedding model and hyperparameters.
fit_svd([prompt, sequences, assay, ...])Fit an SVD on the embedding results of PoET.
fit_umap([prompt, sequences, assay, ...])Fit a UMAP on assay using PoET and hyperparameters.
generate(prompt[, num_samples, temperature, ...])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, insert, delete])Score all indels of the query sequence using the specified prompt.
logits(sequences[, prompt])Compute logits for sequences using the PoET model.
score(sequences[, prompt])Score query sequences using the specified prompt.
single_site(sequence[, prompt])Score all single substitutions of the query sequence using the specified prompt.
Attributes
metadataModelMetadata for this model.
model_id