From cc843f6afa249dc7fb12076db4d6fa1892a31b47 Mon Sep 17 00:00:00 2001 From: Alex Burlacu Date: Wed, 29 Mar 2023 19:01:48 +0300 Subject: [PATCH] Fix docstrings --- clearml/model.py | 8 ++++++-- clearml/task.py | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/clearml/model.py b/clearml/model.py index 7ee58edf..02459872 100644 --- a/clearml/model.py +++ b/clearml/model.py @@ -1342,8 +1342,12 @@ class Model(BaseModel): :param project_name: Optional, filter based project name string, if not given query models from all projects :param model_name: Optional Model name as shown in the model artifactory - :param tags: Optional filter models based on list of tags, example: ['production', 'verified', '-qa'] - Notice use '-' prefix to filter out tags. + :param tags: Filter based on the requested list of tags (strings) + To exclude a tag add "-" prefix to the tag. Example: ['production', 'verified', '-qa'] + To include All tags (instead of the default Any behaviour) use "__$all" as the first string, example: + ["__$all", "best", "model", "ever"] + To combine All tags and exclude a list of tags use "__$not" before the excluded tags, example: + ["__$all", "best", "model", "ever", "__$not", "internal", "test"] :param only_published: If True, only return published models. :param include_archived: If True, return archived models. :param max_results: Optional return the last X models, diff --git a/clearml/task.py b/clearml/task.py index 282612ba..f961117c 100644 --- a/clearml/task.py +++ b/clearml/task.py @@ -1021,9 +1021,9 @@ class Task(_Task): :param str task_name: task name (str) in within the selected project Return any partial match of task_name, regular expressions matching is also supported If None is passed, returns all tasks within the project - :param list tags: Filter based on the requested list of tags (strings) (Task must have all the listed tags) + :param list tags: Filter based on the requested list of tags (strings) To exclude a tag add "-" prefix to the tag. Example: ["best", "-debug"] - To include All tags (instead of the default Or) use "__$all" before the tags, example: + To include All tags (instead of the default All behaviour) use "__$all" as the first string, example: ["__$all", "best", "experiment", "ever"] To combine All tags and exclude a list of tags use "__$not" before the excluded tags, example: ["__$all", "best", "experiment", "ever", "__$not", "internal", "test"]