Skip to main content

MX8: bounded data runtime (Rust) exposed to Python.

Project description

mx8 (Python)

This is the Python package for MX8 (built with PyO3 + maturin).

Install (from wheel)

Once you have a wheel (from CI or local build):

  • python -m venv .venv && . .venv/bin/activate
  • pip install mx8-*.whl

Quickstart (local, no S3)

import mx8

mx8.pack_dir(
    "/path/to/imagefolder",
    out="/path/to/mx8-dataset",
    shard_mb=512,
    label_mode="imagefolder",
    require_labels=True,
)

loader = mx8.vision.ImageFolderLoader(
    "/path/to/mx8-dataset@refresh",
    batch_size_samples=64,
    max_inflight_bytes=256 * 1024 * 1024,
    resize_hw=(224, 224),  # (H,W); optional
)

print(loader.classes)  # ["cat", "dog", ...] if labels.tsv exists

for images, labels in loader:
    # Bounded-memory runtime stats (high-water is capped by max_inflight_bytes).
    # stats = loader.stats()
    pass

Labels (optional)

label_mode="imagefolder" is designed to scale:

  • Per-sample records reference a numeric label_id (u64), not a repeated string.
  • The human-readable mapping is stored once at out/_mx8/labels.tsv.

If your input layout is mixed (files directly under the prefix and subfolders), label_mode="auto" may disable ImageFolder labeling. To enforce ImageFolder semantics, use:

mx8.pack_dir(..., label_mode="imagefolder", require_labels=True)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

mx8-0.0.5-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.5 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ x86-64

mx8-0.0.5-cp38-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (18.7 MB view details)

Uploaded CPython 3.8+macOS 10.12+ universal2 (ARM64, x86-64)macOS 10.12+ x86-64macOS 11.0+ ARM64

File details

Details for the file mx8-0.0.5-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for mx8-0.0.5-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f9169b6db5c35964551313a4fefe0513a02fc4cc65822e2e4c2323edde3df7e5
MD5 4e23a13da28f86223a0bd7afe462211f
BLAKE2b-256 aa1b874b129b2f6343cbdb5157ead889e113834f1be46f0e7ea72c4650f4082a

See more details on using hashes here.

File details

Details for the file mx8-0.0.5-cp38-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.

File metadata

File hashes

Hashes for mx8-0.0.5-cp38-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 f8ca59222ee68f01466cd06a256ab0d9085d696500b86c53c92d179c69c54915
MD5 a9d8c9ca7de1c53db5ba6fe5eb694aaa
BLAKE2b-256 101336b5bb47e209a2ec9feb186fb482498ed75369d4ae7ffd3693b633b027d0

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