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

Uploaded Python 3

File details

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

File metadata

  • Download URL: safetensors_dataset-0.0.6.tar.gz
  • Upload date:
  • Size: 13.9 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.6.tar.gz
Algorithm Hash digest
SHA256 e2230a286fcaea1a0b41a3d0a651505183d25f2de7a498ee815d98ff05ff56e1
MD5 9184828a122e6536b765de13515a1d34
BLAKE2b-256 eee2f1ed99c0ed3070a813c56161712f63ee4241145851ff1263bdd128ae5942

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for safetensors_dataset-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 9e42c15daf06364d37b036fea37292bc2208047ce431ff23121ae609b9aa4f9d
MD5 22cb92f342d7aec77a14b814cf870ef8
BLAKE2b-256 ed4b5396380994ca1902741a15e3b59e529de94e36b83d9b917a6e9fe88c9812

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