From adaabf9e39f8dc0fabc562fb8bee7115f005dbef Mon Sep 17 00:00:00 2001 From: Grigori Fursin Date: Wed, 5 Feb 2025 18:18:43 +0100 Subject: [PATCH 1/3] minor docs update --- CONTRIBUTORS.md | 3 ++- docs/README.CM.md | 43 +++++++++++++++++++++++++++++++++++++++++++ docs/README.md | 45 +++------------------------------------------ docs/cmx | 1 + docs/cmx/README.md | 1 - mkdocs.yml | 13 ++++++------- 6 files changed, 55 insertions(+), 51 deletions(-) create mode 100644 docs/README.CM.md create mode 120000 docs/cmx delete mode 100644 docs/cmx/README.md diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index c88508712d..95a3d06713 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -6,12 +6,13 @@ to benefit everyone. Since then, this open-source automation technology as a community effort thanks to all our volunteers, collaborators and contributors listed here in alphabetical order: -# MLCommons Collective Mind (CM) +# MLCommons CM and CMX * @Henryfzh * @Leonard226 * @Oseltamivir * @Submandarine +* Daniel Altunay * Resmi Arjun * Omar Benjelloun (Google) * Alice Cheng (Nvidia) diff --git a/docs/README.CM.md b/docs/README.CM.md new file mode 100644 index 0000000000..c3fc2d31fc --- /dev/null +++ b/docs/README.CM.md @@ -0,0 +1,43 @@ +# CM documentation + +**We plan to rewrite and simplify the CM documentation and tutorials based on user feedback - please stay tuned for more details**. + +Collective Mind (CM) is a lightweight, non-intrusive and technology-agnostic workflow automation framework +being developed by the [MLCommons Task Force on Automation and Reproducibility](https://github.com/mlcommons/ck/blob/master/docs/taskforce.md) +based on the feedback from the [the community, MLCommons members and individual contributors](../CONTRIBUTING.md). + +The goal is to provide a common, simple and human-readable interface to help users encode their knowledge +about how to build, run and customize diverse AI/ML apps, benchmarks and research projects across +continuously changing models, datasets, software and hardware from different vendors in a unified and automated way. + +You can find on-going development tasks [here](https://github.com/mlcommons/ck/blob/dev/docs/taskforce.md#current-tasks). + +* [Getting Started Guide and FAQ](getting-started.md) +* [Introduction](introduction-cm.md) +* [CM installation and customization](installation.md) +* [Unified CLI and Python API](interface.md) + * [CM framework core API](https://cknowledge.org/docs/cm) + * [CM "script" automation](https://github.com/mlcommons/ck/blob/master/cm-mlops/automation/script/README-extra.md) + * [CM "cache" automation](https://github.com/mlcommons/ck/blob/master/cm-mlops/automation/cache/README-extra.md) + * [CM "experiment" automation](https://github.com/mlcommons/ck/blob/master/cm-mlops/automation/experiment/README-extra.md) + * [List of all unified CM automations from MLCommons](list_of_automations.md) + * [List of all portable and reusable CM scripts from MLCommons](https://access.cknowledge.org/playground/?action=scripts) + * The most commonly used CM scripts (basic blocks needed for most portable and tech-agnostic automation workflows) + * [detect OS](https://github.com/mlcommons/ck/tree/master/cm-mlops/script/detect-os) + * [detect CPU](https://github.com/mlcommons/ck/tree/master/cm-mlops/script/detect-cpu) + * [install system deps for CM](https://github.com/mlcommons/ck/tree/master/cm-mlops/script/get-sys-utils-cm) + * [install min system deps for Windows](https://github.com/mlcommons/ck/tree/master/cm-mlops/script/get-sys-utils-min) + * [download file](https://github.com/mlcommons/ck/blob/master/cm-mlops/script/download-file/README-extra.md) + * [extract file](https://github.com/mlcommons/ck/blob/master/cm-mlops/script/extract-file/README-extra.md) + * [download and extract file](https://github.com/mlcommons/ck/blob/master/cm-mlops/script/download-and-extract-file/README-extra.md) + * [detect or install python](https://github.com/mlcommons/ck/tree/master/cm-mlops/script/get-python3) + * [install/manage multiple python venv](https://github.com/mlcommons/ck/tree/master/cm-mlops/script/install-python-venv) + * [detect conda manager](https://github.com/mlcommons/ck/tree/master/cm-mlops/script/get-conda) + * [detect/download COCO dataset](https://github.com/mlcommons/ck/tree/master/cm-mlops/script/get-dataset-coco/README-extra.md) +* [Debugging](debugging.md) +* [Real-world use cases](use-cases.md) +* [Tutorials](tutorials/README.md) +* [Specifications](specs/README.md) +* [Source code](https://github.com/mlcommons/ck/tree/master/cm/cmind) +* [FAQ](faq.md) +* [CM and CK history](history.md) diff --git a/docs/README.md b/docs/README.md index c3fc2d31fc..0fed7fec2d 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,43 +1,4 @@ -# CM documentation +# Documentation -**We plan to rewrite and simplify the CM documentation and tutorials based on user feedback - please stay tuned for more details**. - -Collective Mind (CM) is a lightweight, non-intrusive and technology-agnostic workflow automation framework -being developed by the [MLCommons Task Force on Automation and Reproducibility](https://github.com/mlcommons/ck/blob/master/docs/taskforce.md) -based on the feedback from the [the community, MLCommons members and individual contributors](../CONTRIBUTING.md). - -The goal is to provide a common, simple and human-readable interface to help users encode their knowledge -about how to build, run and customize diverse AI/ML apps, benchmarks and research projects across -continuously changing models, datasets, software and hardware from different vendors in a unified and automated way. - -You can find on-going development tasks [here](https://github.com/mlcommons/ck/blob/dev/docs/taskforce.md#current-tasks). - -* [Getting Started Guide and FAQ](getting-started.md) -* [Introduction](introduction-cm.md) -* [CM installation and customization](installation.md) -* [Unified CLI and Python API](interface.md) - * [CM framework core API](https://cknowledge.org/docs/cm) - * [CM "script" automation](https://github.com/mlcommons/ck/blob/master/cm-mlops/automation/script/README-extra.md) - * [CM "cache" automation](https://github.com/mlcommons/ck/blob/master/cm-mlops/automation/cache/README-extra.md) - * [CM "experiment" automation](https://github.com/mlcommons/ck/blob/master/cm-mlops/automation/experiment/README-extra.md) - * [List of all unified CM automations from MLCommons](list_of_automations.md) - * [List of all portable and reusable CM scripts from MLCommons](https://access.cknowledge.org/playground/?action=scripts) - * The most commonly used CM scripts (basic blocks needed for most portable and tech-agnostic automation workflows) - * [detect OS](https://github.com/mlcommons/ck/tree/master/cm-mlops/script/detect-os) - * [detect CPU](https://github.com/mlcommons/ck/tree/master/cm-mlops/script/detect-cpu) - * [install system deps for CM](https://github.com/mlcommons/ck/tree/master/cm-mlops/script/get-sys-utils-cm) - * [install min system deps for Windows](https://github.com/mlcommons/ck/tree/master/cm-mlops/script/get-sys-utils-min) - * [download file](https://github.com/mlcommons/ck/blob/master/cm-mlops/script/download-file/README-extra.md) - * [extract file](https://github.com/mlcommons/ck/blob/master/cm-mlops/script/extract-file/README-extra.md) - * [download and extract file](https://github.com/mlcommons/ck/blob/master/cm-mlops/script/download-and-extract-file/README-extra.md) - * [detect or install python](https://github.com/mlcommons/ck/tree/master/cm-mlops/script/get-python3) - * [install/manage multiple python venv](https://github.com/mlcommons/ck/tree/master/cm-mlops/script/install-python-venv) - * [detect conda manager](https://github.com/mlcommons/ck/tree/master/cm-mlops/script/get-conda) - * [detect/download COCO dataset](https://github.com/mlcommons/ck/tree/master/cm-mlops/script/get-dataset-coco/README-extra.md) -* [Debugging](debugging.md) -* [Real-world use cases](use-cases.md) -* [Tutorials](tutorials/README.md) -* [Specifications](specs/README.md) -* [Source code](https://github.com/mlcommons/ck/tree/master/cm/cmind) -* [FAQ](faq.md) -* [CM and CK history](history.md) +* [Common Metadata eXchange automation framework (CMX, 2025+)](cmx) +* [Collective Mind automation framework (CM, 2021-2024)](README.CM.md) diff --git a/docs/cmx b/docs/cmx new file mode 120000 index 0000000000..552485d3c0 --- /dev/null +++ b/docs/cmx @@ -0,0 +1 @@ +../cmx \ No newline at end of file diff --git a/docs/cmx/README.md b/docs/cmx/README.md deleted file mode 100644 index a0990367ef..0000000000 --- a/docs/cmx/README.md +++ /dev/null @@ -1 +0,0 @@ -TBD diff --git a/mkdocs.yml b/mkdocs.yml index 2c9c2331db..fcde12ecfe 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -20,14 +20,13 @@ theme: - toc.follow nav: - HOME: index.md - - CMX: - - Summary: ../cmx/README.md - - Introduction: ../cmx/introduction.md - - Installation: ../cmx/install.md - - Getting Started Guide: ../cmx/getting-started.md + - CMX: + - Summary: cmx/README.md + - Introduction: cmx/introduction.md + - Installation: cmx/install.md + - Getting Started Guide: cmx/getting-started.md - CK Playground: https://access.cKnowledge.org - - Releases: - - CMX: https://github.com/mlcommons/ck/releases + - Releases: https://github.com/mlcommons/ck/releases markdown_extensions: - pymdownx.tasklist: From a25e1e7a90a3d707d60f4567ceff782080c78308 Mon Sep 17 00:00:00 2001 From: Grigori Fursin Date: Wed, 5 Feb 2025 18:19:47 +0100 Subject: [PATCH 2/3] minor update --- cm/cmind/repo/automation/mlperf/_cm.json | 12 ++++++++ cm/cmind/repo/automation/mlperf/module.py | 35 +++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 cm/cmind/repo/automation/mlperf/_cm.json create mode 100644 cm/cmind/repo/automation/mlperf/module.py diff --git a/cm/cmind/repo/automation/mlperf/_cm.json b/cm/cmind/repo/automation/mlperf/_cm.json new file mode 100644 index 0000000000..a7a53fb69e --- /dev/null +++ b/cm/cmind/repo/automation/mlperf/_cm.json @@ -0,0 +1,12 @@ +{ + "alias": "mlperf", + "automation_alias": "automation", + "automation_uid": "bbeb15d8f0a944a4", + "desc": "CMX interface for mlcr", + "sort": -1000, + "tags": [ + "automation", + "mlcr" + ], + "uid": "12343304a8964782" +} diff --git a/cm/cmind/repo/automation/mlperf/module.py b/cm/cmind/repo/automation/mlperf/module.py new file mode 100644 index 0000000000..1a3634ed05 --- /dev/null +++ b/cm/cmind/repo/automation/mlperf/module.py @@ -0,0 +1,35 @@ +# CMX interface for mlcr + +import os + +from cmind.automation import Automation +from cmind import utils +from cmind import cli + +class CAutomation(Automation): + """ + CMX interface for mlperf/mlcr + """ + + ############################################################ + def __init__(self, cmind, automation_file): + super().__init__(cmind, __file__) + + ############################################################ + def for(self, i): + """ + CMX interface for MLPerf + + """ + + _cmd = i['control']['_cmd'][2:] + + cmd = 'mlcr ' + ' '.join(_cmd) + + returncode = os.system(cmd) + + r = {'return': returncode} + if returncode > 0: + r['error'] = 'mlcr command failed' + + return r From e0895a5a645d8def1b7b6900765e29f09755a534 Mon Sep 17 00:00:00 2001 From: Grigori Fursin Date: Wed, 5 Feb 2025 18:27:10 +0100 Subject: [PATCH 3/3] bug fixes --- cm/CHANGES.md | 3 +++ cm/cmind/__init__.py | 2 +- cm/cmind/repo/automation/mlperf/_cm.json | 7 +++++-- cm/cmind/repo/automation/mlperf/module.py | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/cm/CHANGES.md b/cm/CHANGES.md index c606ef2431..b4887ff533 100644 --- a/cm/CHANGES.md +++ b/cm/CHANGES.md @@ -1,3 +1,6 @@ +## CMX V4.0.2 + - bug fixes + ## CMX V4.0.1 - provided backward compatibility with various MLCommons tools diff --git a/cm/cmind/__init__.py b/cm/cmind/__init__.py index 00bb72bd3a..336d31d36e 100644 --- a/cm/cmind/__init__.py +++ b/cm/cmind/__init__.py @@ -9,7 +9,7 @@ # White paper: https://arxiv.org/abs/2406.16791 # Project contributors: https://github.com/mlcommons/ck/blob/master/CONTRIBUTING.md -__version__ = "4.0.1" +__version__ = "4.0.2" from cmind.core import access from cmind.core import x diff --git a/cm/cmind/repo/automation/mlperf/_cm.json b/cm/cmind/repo/automation/mlperf/_cm.json index a7a53fb69e..ef5f8d3633 100644 --- a/cm/cmind/repo/automation/mlperf/_cm.json +++ b/cm/cmind/repo/automation/mlperf/_cm.json @@ -1,12 +1,15 @@ { + "action_substitutions": { + "for":"xfor" + }, "alias": "mlperf", "automation_alias": "automation", "automation_uid": "bbeb15d8f0a944a4", - "desc": "CMX interface for mlcr", + "desc": "CMX interface for mlcr/mlperf", "sort": -1000, "tags": [ "automation", - "mlcr" + "mlperf" ], "uid": "12343304a8964782" } diff --git a/cm/cmind/repo/automation/mlperf/module.py b/cm/cmind/repo/automation/mlperf/module.py index 1a3634ed05..eafd4895db 100644 --- a/cm/cmind/repo/automation/mlperf/module.py +++ b/cm/cmind/repo/automation/mlperf/module.py @@ -16,7 +16,7 @@ def __init__(self, cmind, automation_file): super().__init__(cmind, __file__) ############################################################ - def for(self, i): + def xfor(self, i): """ CMX interface for MLPerf