Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add universal check of env vars in cmind.utils #1216

Closed
gfursin opened this issue Apr 19, 2024 · 1 comment
Closed

Add universal check of env vars in cmind.utils #1216

gfursin opened this issue Apr 19, 2024 · 1 comment
Assignees

Comments

@gfursin
Copy link
Contributor

gfursin commented Apr 19, 2024

We have lots of following code in CM scripts:

    if str(env.get('CM_DOCKER_PUSH_IMAGE', '')).lower() in ['true', 'yes', 'on']:

I suggest to provide a cmind.utils.is_env_true and cmind.utils.is_env_false` to unify it ...
We will then need to add an extra check for min CM versions in such updated scripts: mlcommons/cm4mlops#15

@gfursin gfursin self-assigned this Apr 19, 2024
ctuning-admin added a commit that referenced this issue Apr 23, 2024
CM v2.2.0 release:
- fixed detection of a CM artifact using 'cm info .' when inside virtual
env entries.
- added "cmind.utils.debug_here" function to attach remote Python
debugger
     and tested with Visual Studio Code.
   - added test to avoid checking out CM repo that was not pulled
- added utils.safe_load_json to return empty dict if file doesn't exist
- added utils.compare_versions to check min version requirements for
automations and entries
- removed outdated convert_path
(#1219)
- added utils.check_if_true_yes_on
(#1216)
- check "min_cm_version" in CM automations and CM scripts (use _cm.yaml
or _cm.json)
@ctuning-admin
Copy link
Member

Done.

gfursin added a commit that referenced this issue Apr 23, 2024
CM v2.2.0 release:
- fixed detection of a CM artifact using 'cm info .' when inside virtual
env entries.
- added "cmind.utils.debug_here" function to attach remote Python
debugger
     and tested with Visual Studio Code.
   - added test to avoid checking out CM repo that was not pulled
- added utils.safe_load_json to return empty dict if file doesn't exist
- added utils.compare_versions to check min version requirements for
automations and entries
- removed outdated convert_path
(#1219)
- added utils.check_if_true_yes_on
(#1216)
- check "min_cm_version" in CM automations and CM scripts (use _cm.yaml
or _cm.json)
ctuning-admin added a commit that referenced this issue Apr 26, 2024
CM v2.2.0 release:
- fixed detection of a CM artifact using 'cm info .' when inside virtual
env entries.
- added "cmind.utils.debug_here" function to attach remote Python
debugger
     and tested with Visual Studio Code.
   - added test to avoid checking out CM repo that was not pulled
- added utils.safe_load_json to return empty dict if file doesn't exist
- added utils.compare_versions to check min version requirements for
automations and entries
- removed outdated convert_path
(#1219)
- added utils.check_if_true_yes_on
(#1216)
- check "min_cm_version" in CM automations and CM scripts (use _cm.yaml
or _cm.json)
gfursin added a commit that referenced this issue Apr 28, 2024
CM v2.2.0 release:
- fixed detection of a CM artifact using 'cm info .' when inside virtual
env entries.
- added "cmind.utils.debug_here" function to attach remote Python
debugger
     and tested with Visual Studio Code.
   - added test to avoid checking out CM repo that was not pulled
- added utils.safe_load_json to return empty dict if file doesn't exist
- added utils.compare_versions to check min version requirements for
automations and entries
- removed outdated convert_path
(#1219)
- added utils.check_if_true_yes_on
(#1216)
- check "min_cm_version" in CM automations and CM scripts (use _cm.yaml
or _cm.json)
arjunsuresh pushed a commit to mlcommons/cm4mlops that referenced this issue May 1, 2024
CM v2.2.0 release:
- fixed detection of a CM artifact using 'cm info .' when inside virtual
env entries.
- added "cmind.utils.debug_here" function to attach remote Python
debugger
     and tested with Visual Studio Code.
   - added test to avoid checking out CM repo that was not pulled
- added utils.safe_load_json to return empty dict if file doesn't exist
- added utils.compare_versions to check min version requirements for
automations and entries
- removed outdated convert_path
(mlcommons/ck#1219)
- added utils.check_if_true_yes_on
(mlcommons/ck#1216)
- check "min_cm_version" in CM automations and CM scripts (use _cm.yaml
or _cm.json)
arjunsuresh pushed a commit to mlcommons/cm4mlops that referenced this issue May 1, 2024
CM v2.2.0 release:
- fixed detection of a CM artifact using 'cm info .' when inside virtual
env entries.
- added "cmind.utils.debug_here" function to attach remote Python
debugger
     and tested with Visual Studio Code.
   - added test to avoid checking out CM repo that was not pulled
- added utils.safe_load_json to return empty dict if file doesn't exist
- added utils.compare_versions to check min version requirements for
automations and entries
- removed outdated convert_path
(mlcommons/ck#1219)
- added utils.check_if_true_yes_on
(mlcommons/ck#1216)
- check "min_cm_version" in CM automations and CM scripts (use _cm.yaml
or _cm.json)
arjunsuresh pushed a commit to mlcommons/cm4mlops that referenced this issue May 1, 2024
CM v2.2.0 release:
- fixed detection of a CM artifact using 'cm info .' when inside virtual
env entries.
- added "cmind.utils.debug_here" function to attach remote Python
debugger
     and tested with Visual Studio Code.
   - added test to avoid checking out CM repo that was not pulled
- added utils.safe_load_json to return empty dict if file doesn't exist
- added utils.compare_versions to check min version requirements for
automations and entries
- removed outdated convert_path
(mlcommons/ck#1219)
- added utils.check_if_true_yes_on
(mlcommons/ck#1216)
- check "min_cm_version" in CM automations and CM scripts (use _cm.yaml
or _cm.json)
arjunsuresh pushed a commit to mlcommons/cm4mlops that referenced this issue May 1, 2024
CM v2.2.0 release:
- fixed detection of a CM artifact using 'cm info .' when inside virtual
env entries.
- added "cmind.utils.debug_here" function to attach remote Python
debugger
     and tested with Visual Studio Code.
   - added test to avoid checking out CM repo that was not pulled
- added utils.safe_load_json to return empty dict if file doesn't exist
- added utils.compare_versions to check min version requirements for
automations and entries
- removed outdated convert_path
(mlcommons/ck#1219)
- added utils.check_if_true_yes_on
(mlcommons/ck#1216)
- check "min_cm_version" in CM automations and CM scripts (use _cm.yaml
or _cm.json)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants