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.11.tar.gz (22.1 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.11-py3-none-any.whl (23.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: safetensors_dataset-0.0.11.tar.gz
  • Upload date:
  • Size: 22.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.13

File hashes

Hashes for safetensors_dataset-0.0.11.tar.gz
Algorithm Hash digest
SHA256 144ca2ade05db97a12faa551ea3664abb33c53d0c5a49b5a2eb98fd0e16881e7
MD5 6a2804983ce1920081fe3a5ce9afbdcb
BLAKE2b-256 662de3dc49b441d3ba6b35506c541454c4d2252da0ec74c9f2dc7fe04b880d87

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for safetensors_dataset-0.0.11-py3-none-any.whl
Algorithm Hash digest
SHA256 1c0c59474dc9e8ae88f0ec606dd113fdb87c1ba82bef9abeea3c971bf8b72c39
MD5 de79d75561f20c4ed7decd9cab16f60c
BLAKE2b-256 55d89bea9317643cc6ac2852960d8c4ebbd7c8c377604b09360e58725661e8c8

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