Skip to main content

A simple but handy Python library to save PyTorch datasets in safetensors format.

Project description

safetensors-dataset

safetensors-dataset is a very simple and tiny package adding support to efficiently load and store Pytorch datasets in the safetensors file format:

import torch
from safetensors_dataset import SafetensorsDataset

dataset = SafetensorsDataset.from_dict({
    "x": torch.randn(8, 12, 3),
    "y": torch.randint(12, (8,))
})
dataset.save_to_file("test.safetensors")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

safetensors_dataset-0.0.3.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

safetensors_dataset-0.0.3-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file safetensors_dataset-0.0.3.tar.gz.

File metadata

  • Download URL: safetensors_dataset-0.0.3.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.10.13

File hashes

Hashes for safetensors_dataset-0.0.3.tar.gz
Algorithm Hash digest
SHA256 4266dbde9ec7e0caed066803109558d7636d1737b2082bae397436a1722eb8d9
MD5 2f7a626009ac07279ecb713e2338c651
BLAKE2b-256 bbbd0856ca74480bddc788c4789b5abd78d02ac322f00ef92d3828852ddf5388

See more details on using hashes here.

File details

Details for the file safetensors_dataset-0.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for safetensors_dataset-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 bacaeeab16af15e950f41a36483ca67e430ae808deee7843a0cb94a95abdc2e9
MD5 bf638f012ccba304398e0a6b187df5b7
BLAKE2b-256 dc121dbf9da8d6dc468d0164309d9eb0bf9237cb4ca4d864ff246ffd681ac6f3

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page