Smart Datasets (🧪Beta)
albert.collections.smart_datasets.SmartDatasetCollection
Bases: BaseCollection
A collection for managing smart datasets in the Albert platform (🧪Beta).
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 Albert session instance. |
required |
Attributes:
| Name | Type | Description |
|---|---|---|
base_path |
str
|
The base URL for smart dataset API requests. |
Methods:
| Name | Description |
|---|---|
create |
Creates a new smart dataset entity. |
get_all |
Lists all smart datasets for the tenant. |
get_by_id |
Retrieves a smart dataset by its ID. |
update |
Updates a smart dataset. |
delete |
Deletes a smart dataset by its ID. |
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
session
|
AlbertSession
|
The Albert session instance. |
required |
Source code in src/albert/collections/smart_datasets.py
create
create(
*, scope: SmartDatasetScope, build: bool = True
) -> SmartDataset
Creates a new smart dataset entity.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
scope
|
SmartDatasetScope
|
The scope of the smart dataset. |
required |
build
|
bool
|
Whether to populate the smart dataset with data from Albert. |
True
|
Returns:
| Type | Description |
|---|---|
SmartDataset
|
The created smart dataset entity. |
Source code in src/albert/collections/smart_datasets.py
get_all
get_all() -> list[SmartDataset]
Lists all smart datasets for the tenant.
Returns:
| Type | Description |
|---|---|
list[SmartDataset]
|
A list of SmartDataset entities. |
Source code in src/albert/collections/smart_datasets.py
get_by_id
get_by_id(*, id: SmartDatasetId) -> SmartDataset
Retrieves a smart dataset by its ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
SmartDatasetId
|
The ID of the smart dataset to retrieve. |
required |
Returns:
| Type | Description |
|---|---|
SmartDataset
|
The SmartDataset entity. |
Source code in src/albert/collections/smart_datasets.py
update
update(*, smart_dataset: SmartDataset) -> SmartDataset
Update a smart dataset.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
smart_dataset
|
SmartDataset
|
The smart dataset with updated fields. Must have an id set. |
required |
Returns:
| Type | Description |
|---|---|
SmartDataset
|
The updated SmartDataset. |
Source code in src/albert/collections/smart_datasets.py
delete
delete(*, id: SmartDatasetId) -> None
Deletes a smart dataset by its ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
SmartDatasetId
|
The ID of the smart dataset to delete. |
required |
Returns:
| Type | Description |
|---|---|
None
|
|