Skip to main content

swiss army knife of scripts for transforming and processing datasets for machine learning.

Project description

mldatasets

swiss army knife of scripts for transforming and processing datasets for machine learning

scope

Currently, mldataforge provides space- and time-efficient conversions between JSONL (with or without compression), MosaiclML Dataset (MDS format), and Parquet. The implementations handle conversions by individual samples or small batches of samples and make efficient use of multi-core architectures where possible. Consequently, mldataforge is an excellent choice when transforming TB-scale datasets on data processing nodes with many cores.

installation and general usage

pip install mldataforge
python -m mldataforge --help

usage example: converting MosaiclML Dataset (MDS) to Parquet format

Usage: python -m mldataforge convert mds parquet [OPTIONS] OUTPUT_FILE
                                                 MDS_DIRECTORIES...

Options:
  --compression [snappy|gzip|zstd]
                                  Compress the output file (default: snappy).
  --overwrite                     Overwrite existing path.
  --yes                           Assume yes to all prompts. Use with caution
                                  as it will remove files or even entire
                                  directories without confirmation.
  --batch-size INTEGER            Batch size for loading data and writing
                                  files (default: 65536).
  --no-bulk                       Use a custom space and time-efficient bulk
                                  reader (only gzip and no compression).
  --help                          Show this message and exit.

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

mldataforge-0.1.2.tar.gz (7.4 kB view details)

Uploaded Source

File details

Details for the file mldataforge-0.1.2.tar.gz.

File metadata

  • Download URL: mldataforge-0.1.2.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for mldataforge-0.1.2.tar.gz
Algorithm Hash digest
SHA256 bc64d2c7b50eded1efb53322e7f96afeae1a49e7f9501c95def21752c3741fff
MD5 c02b4836ee5f60f5e13aabb10d7a1ed1
BLAKE2b-256 74f8cd7979495d89d1f052a6859d6493a433d8b5c89f95418b64a501c2828e99

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