Skip to content

Commit

Permalink
Fixed duplicate deps being added from the meta of combined variations
Browse files Browse the repository at this point in the history
  • Loading branch information
arjunsuresh committed Dec 15, 2023
1 parent 252e126 commit fa47e0f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions cm-mlops/automation/script/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -4167,6 +4167,18 @@ def append_deps(deps, new_deps):
deps[i] = new_dep
existing = True
break
else: #when no name, check for tags
new_dep_tags = new_dep.get('tags')
new_dep_tags_list = new_dep_tags.split(",")
for i in range(len(deps)):
dep = deps[i]
dep_tags_list = dep.get('tags').split(",")
if set(new_dep_tags_list) & set (dep_tags_list):
deps[i] = new_dep
existing = True
break
existing = True

if not existing:
deps.append(new_dep)

Expand Down

0 comments on commit fa47e0f

Please sign in to comment.