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.9.post1.tar.gz (15.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

safetensors_dataset-0.0.9.post1-py3-none-any.whl (16.1 kB view details)

Uploaded Python 3

File details

Details for the file safetensors_dataset-0.0.9.post1.tar.gz.

File metadata

File hashes

Hashes for safetensors_dataset-0.0.9.post1.tar.gz
Algorithm Hash digest
SHA256 156c25d3500a77406d1b0ac7f969cea7cc5e8e09f012c005d146c0de31608e0f
MD5 bee314e177fd06303608887f1d63745c
BLAKE2b-256 52b148096aa383085b64498c226a1fbb40366da5a0d5f90aa42e068e7d7551a1

See more details on using hashes here.

File details

Details for the file safetensors_dataset-0.0.9.post1-py3-none-any.whl.

File metadata

File hashes

Hashes for safetensors_dataset-0.0.9.post1-py3-none-any.whl
Algorithm Hash digest
SHA256 2b4d025542f1dd7121a4fe8c6170230fb2135627121b08e6f89790bfe94c7446
MD5 c29581107bf70bb161f1316e3039e1ed
BLAKE2b-256 bef7dbf7f04db3de69d5996a1a6a2c4d5015f0ffa25850fbbe7036459bbd553b

See more details on using hashes here.

Supported by

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