MODULE REFERENCE
datasets
anomx.integrations.platform.datasetsDatasets connected to an Anomx platform.
An AnomxDataset bridges local work and the platform's data module:
```python dataset = AnomxDataset.from_anomx("data_dataset:42f1…") # load by identifier observation_set = dataset.to_observation_set()
dataset = AnomxDataset(name="lab-run-7", frame=frame) dataset.sync_with_anomx() # create it in anomx ```
Credentials come from the /.anomx home the CLI agent maintains; without a configured platform connection an AnomxConnectionError is raised.
AnomxConnectionError
AnomxConnectionErrorBases: RuntimeError
Raised when no platform connection is configured or a call fails.
AnomxDataset
AnomxDataset(*, identifier: str | None = None, name: str = '', description: str = '', frame: pd.DataFrame | None = None, metadata: dict[str, Any] | None = None)A dataset that can be loaded from or created on an Anomx platform.
| Parameter | Type | Default |
|---|---|---|
identifierkeyword only | str | None | None |
namekeyword only | str | '' |
descriptionkeyword only | str | '' |
framekeyword only | pd.DataFrame | None | None |
metadatakeyword only | dict[str, Any] | None | None |
Members
from_anomxclassmethod
from_anomx(identifier: str, *, home: Any | None = None) -> 'AnomxDataset'Load a whole dataset (metadata and samples) from the platform.
| Parameter | Type | Default |
|---|---|---|
identifier | str | required |
homekeyword only | Any | None | None |
Returns 'AnomxDataset'
sync_with_anomxmethod
sync_with_anomx(*, home: Any | None = None) -> strCreate this locally composed dataset on the platform.
Returns the created dataset identifier and stores it on the instance. Sample upload is not part of this first pass — the platform object is created with the dataset's metadata.
| Parameter | Type | Default |
|---|---|---|
homekeyword only | Any | None | None |
Returns str
to_observation_setmethod
to_observation_set(**kwargs: Any) -> ObservationSetMaterialize the loaded samples as the canonical observation set.
| Parameter | Type | Default |
|---|---|---|
**kwargs | Any | — |
Returns ObservationSet
to_csvmethod
to_csv() -> strSerialize the samples as CSV (mirrors the platform export format).
Returns str
read_platform_connection
read_platform_connection(home: Any | None = None) -> dict[str, str]Read the platform URL and token from the /.anomx home.
| Parameter | Type | Default |
|---|---|---|
home | Any | None | None |
Returns dict[str, str]
REQUEST_TIMEOUT_SECONDS
REQUEST_TIMEOUT_SECONDS = 30