openprotein.predictor.PredictorModel#
- class openprotein.predictor.PredictorModel(session, job=None, metadata=None)[source]#
Class providing predict endpoint for fitted predictor models.
Also implements a Future that waits for train job.
- Parameters:
session (APISession)
job (PredictorTrainJob | None)
metadata (PredictorMetadata | None)
- __init__(session, job=None, metadata=None)[source]#
Construct a predictor model.
Takes in either a train job, or the predictor metadata.
- Parameters:
session (APISession)
job (PredictorTrainJob | PredictorEnsembleJob | None)
metadata (PredictorMetadata | None)
Methods
__init__(session[, job, metadata])Construct a predictor model.
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.
crossvalidate([n_splits])Run a crossvalidation on the trained predictor.
delete()Delete this predictor model.
done()Check if the job has completed.
get([verbose])Returns the train loss curves.
get_assay()Get assay used for train job.
get_model()Retrieve the embeddings or SVD model used to create embeddings to train on.
predict(sequences)Make predictions about the trained properties for a list of sequences.
refresh()Refresh the job status and internal job object.
single_site(sequence)Compute the single-site mutated predictions of a base sequence.
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.
idID of predictor.
job_idThe unique identifier of the job.
job_typeThe type of the job.
metadataThe predictor metadata.
modelThe embeddings or SVD model used to create embeddings to train on.
progress_counterThe progress counter of the job.
reductionThe reduction of th embeddings used to train the predictor, if any.
sequence_lengthThe sequence length constraint on the predictor, if any.
start_dateThe start timestamp of the job.
statusThe current status of the job.
training_assayThe assay the predictor was trained on.
training_propertiesThe list of properties the predictor was trained on.
jobsession