mlcommons / cm4mlops

A collection of portable, reusable and cross-platform automation recipes (CM scripts) with a human-friendly interface and minimal dependencies to make it easier to build, run, benchmark and optimize AI, ML and other applications and systems across diverse and continuously changing models, data sets, software and hardware (cloud/edge)
http://docs.mlcommons.org/cm4mlops/
Apache License 2.0
7 stars 12 forks source link

CM workflow fails for MLPerf ResNet50 inference benchmark on Windows 11 #66

Closed mlosab3 closed 3 weeks ago

mlosab3 commented 3 weeks ago

To reproduce on Windows 11:

$ cm version
2.3.1

$ cm pull repo mlcommons@cm4mlops --checkout=mlperf-inference
...

$ cm run script --tags=run-mlperf,inference,_performance-only,_short  ^
   --division=open ^
   --category=edge ^
   --device=cpu ^
   --model=resnet50 ^
   --precision=float32 ^
   --implementation=mlcommons-python ^
   --backend=onnxruntime ^
   --scenario=Offline ^
   --execution_mode=test ^
   --power=no ^
   --adr.python.version_min=3.8 ^
   --clean ^
   --compliance=no ^
   --quiet ^
   --time

Fails on downloading the Imagenet dataset with

Downloading to C:\CM\repos\local\cache\dd655002d28a4a6e\ILSVRC2012_img_val_500.tar

Downloaded: 100%
                 ! cd C:\CM\repos\local\cache\dd655002d28a4a6e
                 ! call C:\CM\repos\mlcommons@cm4mlops\script\download-file\run.bat from tmp-run.bat
                 ! call "postprocess" from C:\CM\repos\mlcommons@cm4mlops\script\download-file\customize.py
               ! call "postprocess" from C:\CM\repos\mlcommons@cm4mlops\script\download-and-extract\customize.py

        * cm run script "extract file _path.C:\CM\repos\local\cache\dd655002d28a4a6e\ILSVRC2012_img_val_500.tar"

          * cm run script "detect os"
                 ! cd C:\CM\repos\local\cache\dd655002d28a4a6e
                 ! call C:\CM\repos\mlcommons@cm4mlops\script\detect-os\run.bat from tmp-run.bat
                 ! call "postprocess" from C:\CM\repos\mlcommons@cm4mlops\script\detect-os\customize.py

          * cm run script "get sys-utils-min"
               ! load C:\CM\repos\local\cache\96933db145474fca\cm-cached-state.json

Current directory: C:\CM\repos\local\cache\dd655002d28a4a6e
Command line: "mkdir  "imagenet-2012-val" && tar    -C "imagenet-2012-val"  -xvf "C:\CM\repos\local\cache\dd655002d28a4a6e\ILSVRC2012_img_val_500.tar""

               ! cd C:\CM\repos\local\cache\dd655002d28a4a6e
               ! call C:\CM\repos\mlcommons@cm4mlops\script\extract-file\run.bat from tmp-run.bat
tar: Cannot change to directory C:\CM\repos\local\cache\dd655002d28a4a6e/imagenet-2012-val: No such file or directory
tar: Error is not recoverable: exiting now
The syntax of the command is incorrect.

CM error: Portable CM script failed (name = extract-file, return code = 255)

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Note that it is often a portability issue of a third-party tool or a native script
wrapped and unified by this CM script (automation recipe). Please re-run
this script with --repro flag and report this issue with the original
command line, cm-repro directory and full log here:

https://github.com/mlcommons/cm4mlops/issues

The CM concept is to collaboratively fix such issues inside portable CM scripts
to make existing tools and native scripts more portable, interoperable
and deterministic. Thank you!

However, CM works fine when I use cm pull repo mlcommons@cm4mlops --checkout=dev

+----------+----------+----------+--------+-----------------+---------------------------------+
|  Model   | Scenario | Accuracy |  QPS   | Latency (in ms) | Power Efficiency (in samples/J) |
+----------+----------+----------+--------+-----------------+---------------------------------+
| resnet50 | Offline  |    -     | 53.498 |        -        |                                 |
+----------+----------+----------+--------+-----------------+---------------------------------+

Can someone help fix it please? Many thanks.

arjunsuresh commented 3 weeks ago

Thank you for reporting this. Can you please do cm pull repo and retry the command?

mlosab3 commented 3 weeks ago

It works. Thank you.