mlcommons / training

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

MLCube implementation for ResNet #686

Open davidjurado opened 1 year ago

davidjurado commented 1 year ago

This PR includes the MLCube implementation for the image classification benchmark with Resnet, it also includes a small demo dataset to easily reproduce the benchmark.

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 implementation from GitHub
git clone https://github.com/mlcommons/training && cd training
git fetch origin pull/686/head:feature/resnet_mlcube && git checkout feature/resnet_mlcube
cd image_classification/mlcube

Go to mlcube directory and study what tasks MLCube implements.

cd ./mlcube
mlcube describe

MLCube tasks

For the entire IMAGENET dataset, you will need to download the complete dataset and place it in the workspace under the mlcube folder, then you can use the following tasks:

Process dataset.

mlcube run --task=process_data -Pdocker.build_strategy=always

Train RESNET.

mlcube run --task=train -Pdocker.build_strategy=always

Run compliance checker.

mlcube run --task=check_logs -Pdocker.build_strategy=always

Running a small demo

To download the susample dataset and run the demo use the following command:

mlcube run --task=download_demo,demo -Pdocker.build_strategy=always
github-actions[bot] commented 1 year ago

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