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.4rc2.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

safetensors_dataset-0.0.4rc2-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file safetensors_dataset-0.0.4rc2.tar.gz.

File metadata

File hashes

Hashes for safetensors_dataset-0.0.4rc2.tar.gz
Algorithm Hash digest
SHA256 e6b7bb3b263a894fe0a88f9c0910ac31af0281a932411f7d796ffa724ae2dc06
MD5 b0d9b7691b992d6255700e24534e64c2
BLAKE2b-256 fb495e9f3728eafff445a0a9eb8a8c6ef238ca553469e89abaaf4cb4e8c81505

See more details on using hashes here.

File details

Details for the file safetensors_dataset-0.0.4rc2-py3-none-any.whl.

File metadata

File hashes

Hashes for safetensors_dataset-0.0.4rc2-py3-none-any.whl
Algorithm Hash digest
SHA256 2186ff96f642e0735de7dc49f9633c0cefe3ceba3130e98fc8e204e422b71dac
MD5 2db6f59b6e6ade64dea3e50cfe44e8e6
BLAKE2b-256 b955a5ed1f097688e6c6ac65b0d371b140483486792607075e6a0bff45c06ceb

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