Skip to main content

DatasetHandler

Introduction

DatasetHandler is a cli tool for downloading datasets and performing any necessary preprocessing. It provides two main commands: download and extract, enabling easy management of datasets.

$ datasets
Usage: datasets [OPTIONS] COMMAND [ARGS]...

Options:
  --help  Show this message and exit.

Commands:
  download
  extract

Installation

pip install dataset_handler

Usage

datasets download https://lab.osai.ai/datasets/openttgames/data /data/dataset

Performance

DatasetHandler leverages multiprocessing to significantly enhance performance by utilizing multiple CPU cores. This parallel processing capability ensures faster execution of time-consuming tasks, making the tool efficient for handling large datasets.

Key Areas Utilizing Multiprocessing:

  • Downloading Files: The download_multiprocess function employs multiple processes to download files concurrently, reducing the time required to fetch large datasets from the internet.
  • Unarchiving Files: The unarchive_multiprocess function unpacks multiple archive files simultaneously, speeding up the extraction process of downloaded data.
  • Extracting Images from Videos: The extract_multiprocess function processes multiple video files in parallel to extract frames, which is especially useful for large collections of video data.

By parallelizing these tasks, DatasetHandler ensures that data preparation steps are performed efficiently, saving valuable time and computational resources.

Contributing

  • We use poetry for managing dependencies, please make sure you have poetry installed.
poetry version
  • Install the dependencies using poetry
poetry install --with dev
  • Before you commit and push your changes please run the following
poetry run ruff check
poetry run ruff format
poetry run mypy
poetry run pytest

TODO

  • [documentation] Add badges to README.md.
  • [refactor] Add error handling.
  • [refactor] Add logging.
  • [test] Try to minimize fixtures by using more of pytest-mock.
  • [test] Increase code coverage to 40%.
  • [fix] Triage why coverage data is different on certain versions of python

Metadata

Release files for dataset-handler 0.1.0

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

Source distribution (sdist)

Source distribution for dataset-handler 0.1.0
File Size Uploaded Provenance
dataset_handler-0.1.0.tar.gz 6.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for dataset-handler 0.1.0
File Interpreter ABI Platform
dataset_handler-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 13.2 kB

Release files / dataset_handler-0.1.0.tar.gz

Download URL dataset_handler-0.1.0.tar.gz
Size 6.0 kB
Tags Source
SHA-256 checksum
How to use checksums
abe7f1eb65bd071857a1eb7828e12e6bfd00a5b1f64d59b6d916f76e769f219c
BLAKE2b-256 checksum
How to use checksums
51b9936f2adb6410f0befe8558845c13afa18c5f413841bf681b200ee186dab6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.10.12 Linux/6.5.0-1025-azure

Release files / dataset_handler-0.1.0-py3-none-any.whl

Download URL dataset_handler-0.1.0-py3-none-any.whl
Size 7.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8d2c27af9d598fca5d6a578fb61fa44b1dfe5e13ead74ceb30eb5f0523de73d5
BLAKE2b-256 checksum
How to use checksums
0f7db323c4be9d77932490050f3f715a0281d455930a36d5e145a1a057bc9477
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.10.12 Linux/6.5.0-1025-azure

Security for dataset-handler 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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