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

Uploaded Python 3

File details

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

File metadata

  • Download URL: safetensors_dataset-0.0.7.tar.gz
  • Upload date:
  • Size: 14.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.2

File hashes

Hashes for safetensors_dataset-0.0.7.tar.gz
Algorithm Hash digest
SHA256 19d301bc09b2a6758a3a2d03988d59a2f6c64c635872042e2b598a4b3cab98b0
MD5 1ed6d3890f0db7a238dc01f1177d2aa5
BLAKE2b-256 44c2a3d5d3f75c33d5b5eea036e9e736077dcfcdad72f4bfa15a4833d069da53

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for safetensors_dataset-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 47f03132a24fb6ad369e2a529ff4791d4d7189f47f92e35d1ba8820fb7cf95f9
MD5 6810eb0a09ed4ba34c28449f30a87c09
BLAKE2b-256 34848d4609b924a4c96dc0c948a5a38b6cfdcc70fa600bc99d9f3b2f84fdd46f

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