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

Uploaded Source

Built Distribution

safetensors_dataset-0.0.5rc2-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for safetensors_dataset-0.0.5rc2.tar.gz
Algorithm Hash digest
SHA256 d784e5b2f7fc635ea2fed071666ca3723330528093241c0407c16359c1e57a38
MD5 7f431ab10050b54035de676eab691dbc
BLAKE2b-256 0b3d38870726fcf121cb4db4d136e36bd562235f16e020f2e4146f431e4c6b5a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for safetensors_dataset-0.0.5rc2-py3-none-any.whl
Algorithm Hash digest
SHA256 f878faae60b5cb4b0ab78b087027d14b974224fef1d7ffe193ce03ad9b8f9460
MD5 5c567e234becc919e64941c70528e98d
BLAKE2b-256 97b22dc41a8720315b89e206799f962ea0c6fa1e39b1e64f7bb985833e2c0901

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