diff --git a/README.md b/README.md index 18fa42c85..9959803e0 100755 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ CK consists of several sub-projects: * [CM4ABTF](https://github.com/mlcommons/cm4abtf) - a unified CM interface and automation recipes to run automotive benchmark across different models, data sets, software and hardware from different vendors. -* [CMX (the next generation of CM)](cm/docs/cmx) - we are developing the next generation of CM +* [CMX (the next generation of CM and CM4MLOps)](cm/docs/cmx) - we are developing the next generation of CM to make it simpler and more flexible based on user feedback. Please follow this project [here]( https://github.com/orgs/mlcommons/projects/46 ). @@ -59,8 +59,9 @@ CK consists of several sub-projects: ### Maintainers -* CM/CMX/CM4Research: [Grigori Fursin](https://cKnowledge.org/gfursin) +* CM/CM4Research: [Grigori Fursin](https://cKnowledge.org/gfursin) * CM4MLOps: [Arjun Suresh](https://github.com/arjunsuresh) and [Anandhu Sooraj](https://github.com/anandhu-eng) +* CMX (the next generation of CM) [Grigori Fursin](https://cKnowledge.org/gfursin) ### Citing our project @@ -89,11 +90,11 @@ To learn more about the motivation behind CK and CM technology, please explore t ### Acknowledgments -The open-source Collective Knowledge project (CK) -was founded by [Grigori Fursin](https://cKnowledge.org/gfursin), -sponsored by cTuning.org, HiPEAC and OctoML, and donated to MLCommons -to serve the wider community. This open-source initiative includes -CM, CM4MLOps/CM4MLPerf, CM4ABTF, and CMX automation technologies. -Its development is a collaborative community effort, -made possible by our dedicated [volunteers, collaborators, -and contributors](https://github.com/mlcommons/ck/blob/master/CONTRIBUTING.md)! +The open-source Collective Knowledge project (CK, CM, CM4MLOps/CM4MLPerf, +CM4Research and CMX) was created by [Grigori Fursin](https://cKnowledge.org/gfursin) +and sponsored by cTuning.org, OctoAI and HiPEAC. +Grigori donated CK to MLCommons to benefit the community +and to advance its development as a collaborative, community-driven effort. +We thank MLCommons and FlexAI for supporting this project, +as well as our dedicated [volunteers and collaborators](https://github.com/mlcommons/ck/blob/master/CONTRIBUTING.md) +for their feedback and contributions! diff --git a/cm/CHANGES.md b/cm/CHANGES.md index 28e797a15..492d9a92f 100644 --- a/cm/CHANGES.md +++ b/cm/CHANGES.md @@ -1,8 +1,9 @@ -## V3.4.1.1 +## V3.4.2 - added utils.flatten_dict - added utils.safe_int - added utils.safe_float - added utils.get_set + - added utils.digits ## V3.4.1 - reduced Python min version in pyproject.toml to 3.7 for backwards compatibility diff --git a/cm/cmind/__init__.py b/cm/cmind/__init__.py index 6fa7e4068..d63eb4ef4 100644 --- a/cm/cmind/__init__.py +++ b/cm/cmind/__init__.py @@ -2,7 +2,7 @@ # # Written by Grigori Fursin -__version__ = "3.4.1.1" +__version__ = "3.4.2" from cmind.core import access from cmind.core import x diff --git a/cm/cmind/utils.py b/cm/cmind/utils.py index b06e354f4..23296c6e4 100644 --- a/cm/cmind/utils.py +++ b/cm/cmind/utils.py @@ -2122,3 +2122,33 @@ def get_set(meta, key, state, keys): cur = cur[k] return v + +############################################################################## +def digits(s, first = True): + """ + Get first digits and convert to int + + Args: + s (str): string ("1.3+xyz") + first (bool): if True, choose only first digits, otherwise all + + Returns: + (int): returns int from first digits or 0 + + """ + + v = 0 + + digits = '' + for char in s: + if char.isdigit(): + digits+=char + elif first: + break + + try: + v = int(digits) + except Exception as e: + pass + + return v