Skip to content

Commit 69dae87

Browse files
committed
Update setup.py
1 parent 5fec188 commit 69dae87

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

setup.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,16 +140,19 @@ def command_exists(self, command):
140140
def custom_function(self):
141141
commit_hash = get_commit_hash()
142142
import cmind
143-
r = cmind.access({'action': 'rm',
143+
clean_mlops_repo = os.environ.get('CM_MLOPS_CLEAN_REPO', 'false')
144+
if str(clean_mlops_repo).lower() not in ["no", "0", "false", "off"]:
145+
r = cmind.access({'action': 'rm',
144146
'automation': 'repo',
145147
'artifact': 'mlcommons@cm4mlops',
146148
'force': True,
147149
'all': True})
150+
148151
branch = os.environ.get('CM_MLOPS_REPO_BRANCH', 'dev')
149152
pull_default_mlops_repo = os.environ.get(
150153
'CM_PULL_DEFAULT_MLOPS_REPO', 'true')
151154

152-
if str(pull_default_mlops_repo).lower() not in ["no", "0", "false"]:
155+
if str(pull_default_mlops_repo).lower() not in ["no", "0", "false", "off"]:
153156
r = cmind.access({'action': 'pull',
154157
'automation': 'repo',
155158
'artifact': 'mlcommons@mlperf-automations',

0 commit comments

Comments
 (0)