|
Download task_036/instruction.md from Lego-X/UXInteract: direct link, hf CLI and curl.
- Browser
- Download file 1.78 kB
-
https://huggingface.co/datasets/Lego-X/UXInteract/resolve/main/task_036/instruction.md
- Command line
-
hf download hf://datasets/Lego-X/UXInteract/task_036/instruction.md
-
curl -L -o instruction.md https://huggingface.co/datasets/Lego-X/UXInteract/resolve/main/task_036/instruction.md
1.78 kB
Package and read an image–caption dataset
Build an offline Python standard-library workflow. Read top-level files in data/dataset/ with six-digit sample keys and .jpg or .txt extensions. A key with both is a complete pair. Preserve the supplied inputs, including valid JPEGs.
Outputs
python3 solve.pygeneratesshards/dataset-000000.tar,shards/dataset-000001.tar, and so on, andscore.txt.python3 dataloader_demo.py --batch-size Bprints one JSON array of sample keys per line, with positive batch sizeB.python3 distributed_demo.py --rank R --world-size Nprints one sample key per line and no other stdout. Use positiveNand a zero-based rank0 <= R < N.
Local Python helpers are allowed; do not require additional packages or network access.
Acceptance Checklist
- Discover complete pairs from the current inputs and skip incomplete pairs. Sort the keys lexicographically and put consecutive groups of six in contiguous zero-based shards; the last group may be shorter. Remove stale
dataset-*.taroutputs. - Each archive contains only the original bytes and filenames of the two files for each assigned key, with no duplicates. Ordering of members within the tar is unrestricted.
score.txtcontainsx/y, wherexcounts complete pairs andycounts keys with either extension. Shards and score reflect input changes rather than fixed fixture counts.- With only the shards available, the batch reader emits all keys in global sorted order, with a final short batch when needed.
- With only the shards available, each distributed rank emits sorted keys whose global sample index modulo
NisR. Outputs are disjoint and collectively complete; a single rank reads everything and an empty rank prints nothing.