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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for safetensors_dataset-0.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ad2b8defe3e1cb705904f6d11105b30d71afadb7ec030f41dc584fce650e932 |
|
MD5 | 9eaae6ab369d1592416a4d46951cd43d |
|
BLAKE2b-256 | 5fbee8a6eae1cd6af4681427bac2e99b44e606a9dc90873be4ac2454aefc70da |
Close
Hashes for safetensors_dataset-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2cb9d158a2a409c1f59de063f61f0b9ccca6d9c67fdec936521f842c8cb70d9e |
|
MD5 | 27ab36e8634e85fd280dc946f71350a9 |
|
BLAKE2b-256 | 42da58b3ca5849c5301d3de381cf6a23c1941576763ba175d00932d67bb2b3d6 |