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.2.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: safetensors_dataset-0.0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 9ad2b8defe3e1cb705904f6d11105b30d71afadb7ec030f41dc584fce650e932
MD5 9eaae6ab369d1592416a4d46951cd43d
BLAKE2b-256 5fbee8a6eae1cd6af4681427bac2e99b44e606a9dc90873be4ac2454aefc70da

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for safetensors_dataset-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2cb9d158a2a409c1f59de063f61f0b9ccca6d9c67fdec936521f842c8cb70d9e
MD5 27ab36e8634e85fd280dc946f71350a9
BLAKE2b-256 42da58b3ca5849c5301d3de381cf6a23c1941576763ba175d00932d67bb2b3d6

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