openprotein.umap.UMAPModel#

class openprotein.umap.UMAPModel(session, job=None, metadata=None)[source]#

UMAP model that can be used to create projected embeddings.

The model is also implemented as a Future to allow waiting for a fit job. The projected embeddings of the sequences used to fit the UMAP can be accessed using embeddings.

Parameters:
  • session (APISession)

  • job (UMAPFitJob)

  • metadata (UMAPMetadata | None)

__init__(session, job=None, metadata=None)[source]#
Parameters:
  • session (APISession)

  • job (UMAPFitJob | None)

  • metadata (UMAPMetadata | None)

Methods

__init__(session[, job, metadata])

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 UMAP model.

done()

Check if the job has completed.

embed(sequences, **kwargs)

Use this UMAP model to get projected embeddings from input sequences.

get([verbose])

Retrieve this UMAP model itself.

get_inputs()

Get sequences used for umap 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_date

The creation timestamp of the job.

embeddings

The projected embeddings of the sequences used to fit the UMAP.

end_date

The end timestamp of the job.

id

UMAP unique identifier.

job_id

The unique identifier of the job.

job_type

The type of the job.

metadata

Metadata of the UMAP.

min_dist

Minimum distance specified for the UMAP.

model

Base embeddings model used for the UMAP.

n_components

Number of components specified for the UMAP.

n_neighbors

Number of neighbors specified for the UMAP.

progress_counter

The progress counter of the job.

reduction

Reduction used to fit the UMAP.

sequence_length

Sequence length constraint of the UMAP.

sequences

The sequences used to fit the UMAP.

start_date

The start timestamp of the job.

status

The current status of the job.

job

session