Skip to content

Commit 08ddf4f

Browse files
authored
* Fixes #165, add support for exact_tags_search
1 parent 8a4d84a commit 08ddf4f

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

mlc/action.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -653,6 +653,7 @@ def search(self, i):
653653
uid = i.get("uid")
654654
alias = i.get("alias")
655655
item_repo = i.get('item_repo')
656+
exact_tags_match = i.get('exact_tags_match', False)
656657
fetch_all = True if i.get('fetch_all') else False
657658

658659
# For targets like cache, sometimes user would need to clear the entire cache folder present in the system
@@ -725,7 +726,7 @@ def search(self, i):
725726
p_tags = list(set(tags_to_match) - set(n_tags_))
726727
for res in target_index:
727728
c_tags = res["tags"]
728-
if set(p_tags).issubset(set(c_tags)) and set(n_tags).isdisjoint(set(c_tags)):
729+
if (exact_tags_match and set(p_tags) == set(c_tags)) or (not exact_tags_match and set(p_tags).issubset(set(c_tags)) and set(n_tags).isdisjoint(set(c_tags))):
729730
it = Item(res['path'], res['repo'])
730731
result.append(it)
731732
return {'return': 0, 'list': result}

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "mlcflow"
7-
version = "1.0.19"
7+
version = "1.0.20"
8+
89

910

1011
description = "An automation interface for ML applications"

0 commit comments

Comments
 (0)