Design Candidates (🧪Beta)
albert.collections.design_candidates.DesignCandidateCollection
Bases: BaseCollection
Access design candidates in the Albert platform (🧪 Beta).
A candidate is one formulation a design run proposed, with its sampled inputs and, where the run produced them, its predictions and score. Candidates are read-only.
This collection is accessed as client.design_candidates.
Beta Feature!
Please do not use in production or without explicit guidance from Albert. You might otherwise have a bad experience. This feature currently falls outside of the Albert support contract, but we'd love your feedback!
Example
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
session
|
AlbertSession
|
The authenticated Albert session used for API calls. |
required |
Attributes:
| Name | Type | Description |
|---|---|---|
base_path |
str
|
The base API route for candidate requests. |
Methods:
| Name | Description |
|---|---|
get_by_id |
Get a candidate by its ID. |
get_all |
Get the candidates of a set. |
Source code in src/albert/collections/design_candidates.py
get_by_id
get_by_id(*, id: DesignCandidateId) -> DesignCandidate
Get a candidate by its ID.
rank is not returned here; it is only derived when listing a set's candidates.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
DesignCandidateId
|
The candidate ID (format |
required |
Returns:
| Type | Description |
|---|---|
DesignCandidate
|
The fully populated DesignCandidate. |
Source code in src/albert/collections/design_candidates.py
get_all
get_all(
*,
candidate_set_id: DesignCandidateSetId,
max_items: int | None = None,
) -> Iterator[DesignCandidate]
Get the candidates of a set.
Results are returned as a lazily paginated iterator, in stored order. Each
candidate carries its rank when the set was scored.
Example
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
candidate_set_id
|
DesignCandidateSetId
|
The candidate set (format |
required |
max_items
|
int
|
Stop after this many candidates. |
None
|
Returns:
| Type | Description |
|---|---|
Iterator[DesignCandidate]
|
A lazily paginated iterator over the set's candidates. |