Skip to main content

CLI tool to responsibly share datasets by gzipping, canarying, and tracking provenance.

Project description

Easy Dataset Share

easy-dataset-share helps AI researchers share datasets responsibly. It prevents evaluation contamination by making datasets easy for researchers to use but hard for automated scrapers to ingest.

The easy-dataset-share CLI tool provides basic protection against scraping by making the dataset text itself less scrapeable.

However, sophisticated actors will still be able to scrape your content. Rather than providing unsophisticated further defenses which inconvenience real users, we think you should outsource that defense to a provider like CloudFlare. We wrote an easy tutorial on signing up with CloudFlare Turnstile, which is like CAPTCHA but a. actually effective and b. doesn't inconvenience your real users. See WEB_HOSTING_GUIDE.md

Python 3.10+ PyPI GitHub License: Other/Proprietary

Features

In easy-data-share we include features for:

  • Canary markers: Unique identifiers to detect if your dataset was used for training.
  • Hash verification: Ensuring the process of adding + removing canaries does not alter the dataset through hashing before and after the protection process.
  • Protection layers: Zipping the data to make it not readable in plaintext by basic crawlers. Optional encryption as well.
  • Default Best Practices: We generate a robots.txt and Terms of Service which prohibits use for AI training.
  • Clean removal: Removing all protection while preserving original data (use hash verification to confirm data-integrity).
  • Web hosting (optional): Deploying a protected download site with Cloudflare-Turnstile (a CAPTCHA-replacement)- see WEB_HOSTING_GUIDE.md

Installation

pip install easy-dataset-share

Quick Start

Protect a dataset

easy-dataset-share protect-dir /path/to/dataset

Unprotect and clean

easy-dataset-share unprotect-dir dataset.zip --remove-canaries

Verify integrity

easy-dataset-share hash /path/to/dataset

Options

Run easy-dataset-share --help or for a subcommand easy-dataset-share protect-dir --help. To get a description of the options available.

How it Works

  1. Hash original dataset for integrity baseline
  2. Add canary markers throughout the dataset
  3. Package with robots.txt and optional encryption
  4. Verify integrity when unprotecting (canaries removed, data unchanged)

Example Workflow

# Protect with a password
easy-dataset-share protect-dir my_dataset

# Share dataset.zip publicly

# Recipients unprotect and remove canaries
easy-dataset-share unprotect-dir dataset.zip --remove-canaries
# Output shows: "📊 Dataset hash: abc123..." (matches original)

Use -p your-password to add a password when you zip (and for others to use when they unzip - will now be .zip.enc) Use -v for verbose output to see hashing details and canary operations.

Notes about licensing for Robots.txt (Text & Data Mining (TDM) opt-out)

The robots.txt generated by this helper add TDM protections, see EDRlab for more information.

Hosting with Anti-Scraper Protection

For datasets hosted outside of Hugging Face, we strongly recommend using Cloudflare Turnstile to add an additional layer of protection against automated AI scrapers. See WEB_HOSTING_GUIDE.md for a guide on how to do this.

This layered approach (dataset protection + hosting protection) provides comprehensive defense against automated data harvesting while maintaining accessibility for legitimate researchers.

Maintainence + Development

This is meant to be a collaborative and community project. Please feel encouraged to make PRs to update this repo!

For development:

git clone https://github.com/Responsible-Dataset-Sharing/easy-dataset-share.git
cd easy-dataset-share
pip install -e .
git config core.hooksPath .githooks

Current Maintainers

Acknowledgements

This project was kickstarted by Alex Turner and then funded by the following supporters:

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

easy_dataset_share-0.4.1.tar.gz (440.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

easy_dataset_share-0.4.1-py3-none-any.whl (458.5 kB view details)

Uploaded Python 3

File details

Details for the file easy_dataset_share-0.4.1.tar.gz.

File metadata

  • Download URL: easy_dataset_share-0.4.1.tar.gz
  • Upload date:
  • Size: 440.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for easy_dataset_share-0.4.1.tar.gz
Algorithm Hash digest
SHA256 c5797b2e2de2607d33623aadfea615d5042de9e5545247a0f18b8e512fb2327f
MD5 7a28220bcf9701f342d6e50d9b5cd285
BLAKE2b-256 5ffd1b90187273671a406e4af58262a363f00a1c7b7e37fbb1fb0733f6280edc

See more details on using hashes here.

File details

Details for the file easy_dataset_share-0.4.1-py3-none-any.whl.

File metadata

File hashes

Hashes for easy_dataset_share-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3d45cd1b7349a1a39b90fc14d13bf470f4e7bd51a7daf76e1864aa52c464ac09
MD5 33df5126bdd945fc5f921268046c3d6b
BLAKE2b-256 56cc64c918f8280075df102c4c0377a0c21918022d2e50645cb9ac99b623dd76

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