Design Runs (🧪Beta)
albert.collections.design_runs.DesignRunCollection
Bases: BaseCollection
Trigger inverse-design runs for Smart Datasets (🧪Beta).
This collection is accessed as client.design_runs.
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!
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 design-run requests. |
Methods:
| Name | Description |
|---|---|
create_optimization |
Triggers a model-guided optimization run for a smart dataset. |
create_doe |
Triggers a space-filling design run for a smart dataset. |
validate_optimization |
Validates an optimization run configuration without starting a job. |
validate_doe |
Validates a space-filling run configuration without starting a job. |
Source code in src/albert/collections/design_runs.py
create_optimization
create_optimization(
*,
smart_dataset_id: SmartDatasetId,
name: str | None = None,
objectives: dict[TargetId, DesignObjective]
| None = None,
settings: OptimizationRunSettings | None = None,
chat_session: ChatSessionRef | None = None,
) -> BTInsight
Trigger a model-guided optimization run for a smart dataset.
Trains a surrogate on historical data and searches for candidates predicted to meet targets. Each candidate carries predicted values, uncertainty, and a score. Use this when the user wants candidates optimized toward specific performance targets.
The historical experiments a run accounts for are fixed by the Smart Dataset, not by anything on this call. To compare against a different history, use a different Smart Dataset.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
smart_dataset_id
|
SmartDatasetId
|
The smart dataset whose experiment history anchors the run. |
required |
name
|
str
|
Display name for the resulting insight. When |
None
|
objectives
|
dict[TargetId, DesignObjective]
|
Per-target objectives, each carrying an optional |
None
|
settings
|
OptimizationRunSettings
|
Run sizing for candidate generation and selection. See
|
None
|
chat_session
|
ChatSessionRef
|
Chat session to notify when the run completes. See
|
None
|
Returns:
| Type | Description |
|---|---|
BTInsight
|
A handle to the run. Poll its |
Raises:
| Type | Description |
|---|---|
AlbertClientError
|
The run configuration was rejected, for example the dataset is not
|
AlbertHTTPError
|
Other failures. |
Source code in src/albert/collections/design_runs.py
create_doe
create_doe(
*,
smart_dataset_id: SmartDatasetId,
name: str | None = None,
anchor_targets: list[str] | None = None,
settings: DOERunSettings | None = None,
chat_session: ChatSessionRef | None = None,
) -> BTInsight
Trigger a space-filling DOE design run.
Proposes a batch that covers the design space, spread relative to the
experiments the user already has. Produces no scores and no predictions.
Trains no model. There is no objectives parameter on this method. Use it
when there is little or no data to model, or when the user wants a screening
or starting batch.
The set of historical experiments it accounts for is fixed by the Smart
Dataset, not by anything on this call. To compare against a different
history, use a different Smart Dataset. anchor_targets optionally narrows
the comparison further to experiments that already have a measurement for
every named target id. That changes which existing rows the batch is spread
against, not what the batch is optimized for: there is no direction, target
value, or scoring involved.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
smart_dataset_id
|
SmartDatasetId
|
The smart dataset whose experiment history anchors the run. |
required |
name
|
str
|
Display name for the resulting insight. When |
None
|
anchor_targets
|
list[str]
|
Performance target ids; only experiments measured on every listed target count as historical anchors for diversity. |
None
|
settings
|
DOERunSettings
|
Run sizing for space-filling sampling. See
|
None
|
chat_session
|
ChatSessionRef
|
Chat session to notify when the run completes. See
|
None
|
Returns:
| Type | Description |
|---|---|
BTInsight
|
A handle to the run. Poll its |
Raises:
| Type | Description |
|---|---|
AlbertClientError
|
The run configuration was rejected, for example the dataset is not
|
AlbertHTTPError
|
Other failures. |
Source code in src/albert/collections/design_runs.py
validate_optimization
validate_optimization(
*,
smart_dataset_id: SmartDatasetId,
objectives: dict[TargetId, DesignObjective]
| None = None,
settings: OptimizationRunSettings | None = None,
) -> DesignRunValidationResponse
Validate an optimization run configuration without starting a job.
Uses the same request shape as
create_optimization.
Returns a preflight result with valid and violations. valid=False with
populated violations is a normal result and is not raised as an exception.
Pre-check failures (e.g. dataset not READY, objective out of scope, invalid
settings) are raised as AlbertClientError,
the same class of failure as calling
create_optimization
with a bad configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
smart_dataset_id
|
SmartDatasetId
|
The smart dataset used to train the surrogate model. |
required |
objectives
|
dict[TargetId, DesignObjective]
|
Per-target objectives for the optimization run, each carrying an optional
|
None
|
settings
|
OptimizationRunSettings
|
Run sizing for candidate generation and selection. |
None
|
Returns:
| Type | Description |
|---|---|
DesignRunValidationResponse
|
Preflight result with |
Raises:
| Type | Description |
|---|---|
AlbertClientError
|
Pre-check failures (invalid configuration before validation can run). |
AlbertHTTPError
|
Other request failures. |
Source code in src/albert/collections/design_runs.py
validate_doe
validate_doe(
*,
smart_dataset_id: SmartDatasetId,
anchor_targets: list[str] | None = None,
settings: DOERunSettings | None = None,
) -> DesignRunValidationResponse
Validate a space-filling run configuration without starting a job.
Uses the same request shape as
create_doe.
Returns a preflight result with valid and violations. valid=False with
populated violations is a normal result and is not raised as an exception.
Pre-check failures (e.g. dataset not READY, invalid settings) are raised as
AlbertClientError, the same class of
failure as calling
create_doe
with a bad configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
smart_dataset_id
|
SmartDatasetId
|
The smart dataset whose experiment history anchors the run. |
required |
anchor_targets
|
list[str]
|
Performance target ids that narrow which existing rows count as historical anchors for diversity. |
None
|
settings
|
DOERunSettings
|
Run sizing for space-filling sampling. |
None
|
Returns:
| Type | Description |
|---|---|
DesignRunValidationResponse
|
Preflight result with |
Raises:
| Type | Description |
|---|---|
AlbertClientError
|
Pre-check failures (invalid configuration before validation can run). |
AlbertHTTPError
|
Other request failures. |
Source code in src/albert/collections/design_runs.py
albert.collections.design_runs.DesignRunV4Collection
Bases: DesignRunCollection
Trigger inverse-design runs through the v4 design service (🧪Beta).
This collection is accessed as client.design_runs_v4. It has the same methods,
arguments, and return types as
DesignRunCollection, except
that the create methods return the queued
DesignRun instead of a BTInsight, and
the create and validate methods also take the owning project (parent_id, required)
and accept design_space_id and design_model_config_id. It adds methods to read
stored runs and rename them.
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!
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 path for v4 design runs. |
Methods:
| Name | Description |
|---|---|
create_optimization |
Triggers a model-guided optimization run for a smart dataset. |
create_doe |
Triggers a space-filling design run for a smart dataset. |
validate_optimization |
Validates an optimization run configuration without starting a job. |
validate_doe |
Validates a space-filling run configuration without starting a job. |
get_by_id |
Get a stored design run by its ID. |
get_all |
Get all design runs in a project. |
update |
Update the name or description of a design run. |
Source code in src/albert/collections/design_runs.py
create_optimization
create_optimization(
*,
smart_dataset_id: SmartDatasetId,
name: str | None = None,
objectives: dict[TargetId, DesignObjective]
| None = None,
settings: OptimizationRunSettings | None = None,
chat_session: ChatSessionRef | None = None,
parent_id: ProjectId,
design_space_id: DesignSpaceId | None = None,
design_model_config_id: DesignModelConfigId
| None = None,
) -> DesignRun
Trigger a model-guided optimization run for a smart dataset.
Takes the arguments of
DesignRunCollection.create_optimization
plus the three below, and returns the queued run.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
smart_dataset_id
|
SmartDatasetId
|
The smart dataset whose experiment history anchors the run. |
required |
name
|
str
|
Display name for the run. A name is generated when |
None
|
objectives
|
dict[TargetId, DesignObjective]
|
Per-target objectives. When |
None
|
settings
|
OptimizationRunSettings
|
Run sizing for candidate generation and selection. |
None
|
chat_session
|
ChatSessionRef
|
Chat session to notify when the run completes. |
None
|
parent_id
|
ProjectId
|
The project (format |
required |
design_space_id
|
DesignSpaceId
|
A published design space (format |
None
|
design_model_config_id
|
DesignModelConfigId
|
A published design model config (format |
None
|
Returns:
| Type | Description |
|---|---|
DesignRun
|
The queued run. Poll it with
|
Raises:
| Type | Description |
|---|---|
AlbertClientError
|
The run was rejected. The error lists each violation with its |
AlbertHTTPError
|
Other failures. |
Source code in src/albert/collections/design_runs.py
create_doe
create_doe(
*,
smart_dataset_id: SmartDatasetId,
name: str | None = None,
anchor_targets: list[str] | None = None,
settings: DOERunSettings | None = None,
chat_session: ChatSessionRef | None = None,
parent_id: ProjectId,
design_space_id: DesignSpaceId | None = None,
design_model_config_id: DesignModelConfigId
| None = None,
) -> DesignRun
Trigger a space-filling DOE design run.
Takes the arguments of
DesignRunCollection.create_doe
plus parent_id, design_space_id and design_model_config_id, which
mean the same as on
create_optimization,
and returns the queued run.
Returns:
| Type | Description |
|---|---|
DesignRun
|
The queued run. Poll it with
|
Raises:
| Type | Description |
|---|---|
AlbertClientError
|
The run was rejected. The error lists each violation with its |
AlbertHTTPError
|
Other failures. |
Source code in src/albert/collections/design_runs.py
validate_optimization
validate_optimization(
*,
smart_dataset_id: SmartDatasetId,
objectives: dict[TargetId, DesignObjective]
| None = None,
settings: OptimizationRunSettings | None = None,
parent_id: ProjectId,
design_space_id: DesignSpaceId | None = None,
design_model_config_id: DesignModelConfigId
| None = None,
) -> DesignRunValidationResponse
Validate an optimization run configuration without starting a job.
Takes the same arguments as
create_optimization
and returns a preflight result with valid and violations.
Returns:
| Type | Description |
|---|---|
DesignRunValidationResponse
|
Preflight result with |
Raises:
| Type | Description |
|---|---|
AlbertClientError
|
The run was rejected. The error lists each violation with its |
AlbertHTTPError
|
Other failures. |
Source code in src/albert/collections/design_runs.py
validate_doe
validate_doe(
*,
smart_dataset_id: SmartDatasetId,
anchor_targets: list[str] | None = None,
settings: DOERunSettings | None = None,
parent_id: ProjectId,
design_space_id: DesignSpaceId | None = None,
design_model_config_id: DesignModelConfigId
| None = None,
) -> DesignRunValidationResponse
Validate a space-filling run configuration without starting a job.
Takes the same arguments as
create_doe
and returns a preflight result with valid and violations.
Returns:
| Type | Description |
|---|---|
DesignRunValidationResponse
|
Preflight result with |
Raises:
| Type | Description |
|---|---|
AlbertClientError
|
The run was rejected. The error lists each violation with its |
AlbertHTTPError
|
Other failures. |
Source code in src/albert/collections/design_runs.py
get_by_id
get_by_id(*, id: DesignRunId) -> DesignRun
Get a stored design run by its ID.
Example
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
DesignRunId
|
The design run ID (format |
required |
Returns:
| Type | Description |
|---|---|
DesignRun
|
The fully populated DesignRun. |
Source code in src/albert/collections/design_runs.py
get_all
get_all(
*,
parent_id: ProjectId,
state: DesignRunState | None = None,
method: DesignMethod | None = None,
max_items: int | None = None,
) -> Iterator[DesignRun]
Get all design runs in a project.
Results are returned as a lazily paginated iterator.
Example
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
parent_id
|
ProjectId
|
The project (format |
required |
state
|
DesignRunState
|
Limit to runs in this lifecycle state. |
None
|
method
|
DesignMethod
|
Limit to |
None
|
max_items
|
int
|
Stop after this many runs. |
None
|
Returns:
| Type | Description |
|---|---|
Iterator[DesignRun]
|
A lazily paginated iterator over the design runs. |
Source code in src/albert/collections/design_runs.py
update
Update the name or description of a design run.
Retrieve the run with
get_by_id,
modify name and/or description, then pass it here. Only changed fields
are applied. This works in every state.
Example
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
design_run
|
DesignRun
|
The run carrying the desired changes. Its |
required |
Returns:
| Type | Description |
|---|---|
DesignRun
|
The updated design run. |
Notes
The following fields can be updated: name, description.