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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: safetensors_dataset-0.0.5.tar.gz
  • Upload date:
  • Size: 11.5 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.5.tar.gz
Algorithm Hash digest
SHA256 b1fb5bd4e5e64d9483e0f08284406bb5975d79e00294973c444edc6f1a280144
MD5 bbbc484c14bf8d944de21c102f067f08
BLAKE2b-256 2dadb34fdecc0870561b899612077f3585ae08bd53a0e2652d99a9a09a0b052b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for safetensors_dataset-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 ac7948ffc36e48a6b9df8e4e09cbd82625f04a2243e999060654843be1b4c7e9
MD5 07f5dc5f0a5cb7e7c52ff9d5e7a5cf0b
BLAKE2b-256 6a1e811e6f71171eeb69f48bad1b011bb918129d700d2beffe961e486290745b

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