mlcommons / training

Reference implementations of MLPerf™ training benchmarks
https://mlcommons.org/en/groups/training
Apache License 2.0
1.58k stars 549 forks source link

Add MLCube support for Object Detection Benchmark #501

Open davidjurado opened 3 years ago

davidjurado commented 3 years ago

Benchmark execution with MLCube

Project setup

# Create Python environment and install MLCube Docker runner 
virtualenv -p python3 ./env && source ./env/bin/activate && pip install pip==24.0 && pip install mlcube-docker

# Fetch the Object Detection workload
git clone https://github.com/mlcommons/training && cd ./training
git fetch origin pull/501/head:feature/object_detection && git checkout feature/object_detection
cd ./object_detection/mlcube

Dataset

The COCO dataset will be downloaded and extracted. Sizes of the dataset in each step:

Dataset Step MLCube Task Format Size
Download (Compressed dataset) download_data Tar/Zip files ~20.5 GB
Extract (Uncompressed dataset) download_data Jpg/Json files ~21.2 GB
Total (After all tasks) All ~41.7 GB

Tasks execution

Parameters are defined at these files:

# Download COCO dataset. Default path = /workspace/data
mlcube run --task=download_data -Pdocker.build_strategy=always

# Run benchmark. Default paths = ./workspace/data
mlcube run --task=train -Pdocker.build_strategy=always

Demo execution

These tasks will use a demo dataset (39M) to execute a faster training workload for a quick demo (~12 min):

# Download subsampled dataset. Default path = /workspace/demo
mlcube run --task=download_demo -Pdocker.build_strategy=always

# Run benchmark. Default paths = ./workspace/demo and ./workspace/demo_output
mlcube run --task=demo -Pdocker.build_strategy=always

It's also possible to execute the two tasks in one single instruction:

mlcube run --task=download_demo,demo -Pdocker.build_strategy=always

Aditonal options

Parameters defined at mculbe/mlcube.yaml could be overridden using: --param=input

We are targeting pull-type installation, so MLCube images should be available on docker hub. If not, try this:

mlcube run ... -Pdocker.build_strategy=always
github-actions[bot] commented 3 years ago

MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ ✅

johntran-nv commented 1 year ago

@mmarcinkiewicz are you the right person to review this one?

nv-rborkar commented 4 months ago

@davidjurado can you please address Shriya's feedback. We can then merge this PR.