Breakthrough Datasets
albert.collections.btdataset.BTDatasetCollection
Bases: BaseCollection
Manage Breakthrough datasets in the Albert platform.
Albert Breakthrough is Albert's inverse-design / ML optimization capability. A dataset
(BTDataset) is the tabular data used to
build and train Breakthrough models. A dataset can reference the Albert entities
it was assembled from (projects, data columns, targets, and worksheets) via its
references. Datasets feed into model sessions and models
(BTModelSessionCollection,
BTModelCollection), whose dataset_id
points back here.
Datasets are identified by a dataset ID (format DST..., e.g. "DST1").
This collection is accessed as client.btdatasets.
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 dataset requests. |
Methods:
| Name | Description |
|---|---|
create |
Create a new dataset. |
get_by_id |
Get a single dataset by its ID. |
get_all |
Iterate over datasets, optionally filtered by name or creator. |
update |
Update an existing dataset. |
delete |
Delete a dataset by its ID. |
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
session
|
AlbertSession
|
The authenticated Albert session used for API calls. |
required |
Source code in src/albert/collections/btdataset.py
create
Create a new dataset.
Example
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dataset
|
BTDataset
|
The dataset to create. |
required |
Returns:
| Type | Description |
|---|---|
BTDataset
|
The newly created dataset, populated with its assigned ID. |
Source code in src/albert/collections/btdataset.py
get_by_id
get_by_id(*, id: BTDatasetId) -> BTDataset
Get a single dataset by its ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
BTDatasetId
|
The dataset ID (format |
required |
Returns:
| Type | Description |
|---|---|
BTDataset
|
The fully populated dataset. |
Source code in src/albert/collections/btdataset.py
update
Update an existing dataset.
Fetch the dataset (e.g. with get_by_id), modify the updatable
fields on the returned object, then pass it here. Only the fields listed in
Notes are applied; changes to other fields are ignored.
Example
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dataset
|
BTDataset
|
The dataset to update. Must have a valid |
required |
Returns:
| Type | Description |
|---|---|
BTDataset
|
The updated dataset. |
Notes
The following fields can be updated: file_name, key, name,
references.
Source code in src/albert/collections/btdataset.py
delete
delete(*, id: BTDatasetId) -> None
Delete a dataset by its ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
BTDatasetId
|
The dataset ID to delete (format |
required |
Returns:
| Type | Description |
|---|---|
None
|
|
Source code in src/albert/collections/btdataset.py
get_all
get_all(
*,
name: str | None = None,
created_by: str | None = None,
start_key: str | None = None,
max_items: int | None = None,
) -> Iterator[BTDataset]
Iterate over datasets, optionally filtered by name or creator.
Results are returned as a lazily paginated iterator, so iterating fetches additional pages on demand.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Filter datasets by name. |
None
|
created_by
|
str
|
Filter datasets by the user who created them. |
None
|
start_key
|
str
|
Resume pagination from this key (from a previous partial iteration). |
None
|
max_items
|
int
|
Maximum number of items to return in total. If None, iterates over all matches. |
None
|
Returns:
| Type | Description |
|---|---|
Iterator[BTDataset]
|
A lazily paginated iterator over datasets. |