Skip to content

Commit

Permalink
Merge pull request #34 from mlcommons/poc
Browse files Browse the repository at this point in the history
Added the cm run command inside the docker
  • Loading branch information
arjunsuresh authored Jun 20, 2024
2 parents 586a6b4 + a3115bb commit 471cb4b
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-mlperf-inference-abtf-poc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ jobs:
cm pull repo --url=${{ github.event.pull_request.head.repo.html_url }} --checkout=${{ github.event.pull_request.head.ref }}
- name: Test MLPerf Inference ABTF POC using ${{ matrix.backend }} natively
run: |
cm run script --tags=run-abtf,inference,_poc-demo --quiet --env.CM_MLPERF_LOADGEN_BUILD_FROM_SRC=off --adr.raw-dataset-mlcommons-cognata.tags=_gdrive -v
cm run script --tags=run-abtf,inference,_poc-demo --quiet --env.CM_MLPERF_LOADGEN_BUILD_FROM_SRC=off --adr.raw-dataset-mlcommons-cognata.tags=_gdrive --adr.ml-model-abtf.tags=_gdrive -v

2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ For ease of use, many of the benchmark components are packaged in a container wh

To try out the POC reference yourself, please visit the [Run](run/index.md) section. The POC reference only has 20 frames, to see the object detection model run on an entire sequence, follow this link:

* TODO: Add MLCommons YouTube clip
[![Object Detection](https://img.youtube.com/vi/ZteVUJkTtno/0.jpg)](https://www.youtube.com/watch?v=ZteVUJkTtno)

In the sections below the components of the benchmark are described.

Expand Down
12 changes: 10 additions & 2 deletions docs/run/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,28 @@ By running the script below, you are downloading the POC container and dataset,
=== "Docker"
### Docker

Set up docker
```bash
cm run script --tags=run-abtf,_poc-demo --quiet \
--docker --docker_cache=no
```

!!! tip
* Use `--rerun` to force overwrite the previously generated results
* Use `--env.CM_MLPERF_LOADGEN_BUILD_FROM_SRC=off` to use the prebuilt MLPerf Loadgen binary and not do a source compilation
* Use `--docker_os=[rhel|arch|ubuntu]` to change the docker OS
* Use `--docker_os_version=[8|9]` for `RHEL`, `[24.04|22.04|20.04]` for `ubuntu` and `[latest]` for `arch`
* Use `--docker_base_image=[IMAGE_NAME]` to override the default base image for docker
* Github actions for this run can be seen [here](https://github.com/mlcommons/cm4abtf/actions/workflows/test-mlperf-inference-abtf-poc.yml)
We have tested the workflow via docker on Ubuntu 24.04, Ubuntu 22.04, Ubuntu 20.04 and macOS 14

Run Command (inside docker)
```bash
cm run script --tags=run-abtf,_poc-demo --quiet
```
!!! tip
* Use `--rerun` to force overwrite the previously generated results
* Use `--env.CM_MLPERF_LOADGEN_BUILD_FROM_SRC=off` to use the prebuilt MLPerf Loadgen binary and not do a source compilation

We have tested the workflow via docker on Ubuntu 24.04, Ubuntu 22.04, Ubuntu 20.04, Windows 11 and macOS 14
=== "Native"
### Native

Expand Down
22 changes: 20 additions & 2 deletions script/get-ml-model-abtf-ssd-pytorch/_cm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,16 +114,26 @@ variations:

abtf-poc:
default_variations:
download-tool: gdown
download-tool: rclone
env:
CM_ML_MODEL: abtf-ssd-pytorch
CM_ML_MODEL_CHECKSUM: 26845c3b9573ce115ef29dca4ae5be14
CM_ML_MODEL_DATASET: cognata
CM_ML_MODEL_FILENAME: baseline_8MP_ss_scales_fm1_5x5_all_ep60.pth
CM_ML_MODEL_IMAGE_SIZE: '8M'
CM_ML_MODEL_URL: https://drive.google.com/file/d/1kfJR_bs54KONprVd51kZu0PYmmh1wZZa/view
group: model-weights

abtf-poc,gdrive:
env:
CM_ML_MODEL_URL: https://drive.google.com/file/d/1kfJR_bs54KONprVd51kZu0PYmmh1wZZa/view

abtf-poc,rclone:
env:
CM_RCLONE_COPY_USING: copyurl
CM_ML_MODEL_URL: https://automotive.mlcommons-storage.org/SSD_ResNet50%2Fbaseline_8MP_ss_scales_fm1_5x5_all_ep60.pth
CM_RCLONE_CONFIG_CMD: ''


local.#:
env:
CM_ML_MODEL_FILENAME: '#'
Expand All @@ -141,6 +151,14 @@ variations:
env:
CM_SKIP_MODEL_CODE_DOWNLOAD: 'yes'

rclone:
group: download-tool
env:
CM_RCLONE_COPY_USING: copyurl
adr:
abtf-ml-model-weights-download:
tags: _rclone

wget:
group: download-tool
default: true
Expand Down

0 comments on commit 471cb4b

Please sign in to comment.