Skip to main content

Files Dataset

Dead simple standard for storing/loading datasets as files. Supports TAR and ZIP archives.

pip install files-dataset

Format

A dataset folder looks something like this:

my-dataset/
  meta.json
  car-images/
    001.jpg
    002.jpg
    003.jpg
  train-images/
    images.tar
  ...

meta.json:

{
  "files_dataset": {
    "cars": {
      "archive": "car-images/*.jpg",
      "num_files": 3000 // optionally specify the number of files
    },
    "trains": {
      "archive": "train-images/images.tar",
      "format": "tar",
      "num_files": 10000
    }
  },
  // you can add other stuff if you want to
}

Usage

import files_dataset as fds

ds = fds.Dataset.read('path/to/my-dataset')
num_samples = ds.len('cars', 'trains') # int | None

for x in ds.samples('inputs', 'labels'):
  x['cars'] # the first car image
  x['trains'] # the first train image (extracted from the TAR archive)

A common convenience to use is:

import files_dataset as fds

datasets = fds.glob('path/to/datasets/*') # list[fds.Dataset]
for x in fds.chain(datasets, 'trains', 'cars'):
  ...

And that's it! Simple.

Metadata

Release files for files-dataset 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for files-dataset 0.1.4
File Size Uploaded
files_dataset-0.1.4.tar.gz 3.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for files-dataset 0.1.4
File Interpreter ABI Platform
files_dataset-0.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 8.6 kB

Release files / files_dataset-0.1.4.tar.gz

Download URL files_dataset-0.1.4.tar.gz
Size 3.9 kB
Tags Source
SHA-256 checksum
How to use checksums
de8c23030a6c3dd5e5b08c2bf612309337b1fd89613d60c0aa6ece65eb658cb9
BLAKE2b-256 checksum
How to use checksums
c237faa0fd9fdf0712935041b04432f5dde4329c5b3a0fe051ec6206e7840665
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.11.9

Release files / files_dataset-0.1.4-py3-none-any.whl

Download URL files_dataset-0.1.4-py3-none-any.whl
Size 4.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4eea6840d57a08565e6d3f781908a9e180c47ad7da52504711910a8b6b5fa1ac
BLAKE2b-256 checksum
How to use checksums
8f75c10e02c75502cf8b96d4e759405744ba7bab33dcbe90c7be806c79d285e7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.11.9

Release history Release notifications | RSS feed

This release

0.1.4 This release

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page