loadSampleDataset is a top-level export:
Parameters
The download has a 120-second timeout, and the decompressed dataset is capped at 512 MB. Each dataset’s SHA-256 digest is pinned in the SDK and checked after download and on every cache read, so a tampered file is rejected and downloaded again. Decompression needs the runtime’s
DecompressionStream.
Returns
Promise<SampleDataset>:
The package also exports the
SampleDataset, SampleFilter, and LoadSampleDatasetOptions types and the DEFAULT_SAMPLE_DATASET and SAMPLE_DATASETS_BASE_URL constants.
Exceptions
Error
Error
The dataset name is unknown, the download fails or times out, the file fails its SHA-256 check, it exceeds 512 MB, or the runtime has no
DecompressionStream.