Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escaping: Escape characters +-&|!(){}[]^"~*?:\ with \, e.g. \+
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Answered
Hello Everyone, I Have A Small Question For The

Hello everyone, I have a small question for the clearml api . I am trying to filter tasks that have 2 tags. It seems the default condition operator is or ; I could I change to and ? I have not found anything in the documentation 😄

from clearml.backend_api.session.client import APIClient

client = APIClient()
tasks = client.tasks.get_all( 
                            tags=["tag_1", "tag_2"],
                            search_hidden=True
                            )
  
  
Posted one year ago
Votes Newest

Answers 9


Hey @<1523701070390366208:profile|CostlyOstrich36> ! I makes total sense. Thank you very much for your explanation and sorry I misunderstood you the first time around 🙂 found it and FYI for whoever is following the thread its "__$and"
image

  
  
Posted one year ago

@<1582179652133195776:profile|LudicrousPanda17> , I think you misunderstood me. This is entirely possible through the API. I suggest you do this via UI with dev tools open (F12) to see what the UI is sending since the UI is using the same API. Then you can replicate this behavior via code. Understood?

  
  
Posted one year ago

Hey @<1523701070390366208:profile|CostlyOstrich36> Just checking back on this… any updates? Is this doable? Or does this feature not exist?

  
  
Posted one year ago

yeah I know that your method will allow me to do it via the UI; but that would be a manual task. I am trying to add a clearml task that does that automatically, without me opening the UI. This script will search through the server api look for set of tags and execute extra action (e.g. renqueue them once a new fix task is available, runner debugging task, etc …)

  
  
Posted one year ago

Not sure what I'm missing, but I'm quite sure you could do exactly that through the UI, no?

  
  
Posted one year ago

To give a bit more context, I am tagging my controller task both with the version of the pipeline and with a failure type ; I want to do some more analysis on these tasks or renqueue when I fix a given bug…. maybe there is a better way to get all controller failed due the same error for the same controller version

  
  
Posted one year ago

Thanks for the hints, but I am using a script to basically do <<a given action>> based on <<a given condition>> . the condition is the presence of both tags in a task, which I thought was the simpler way to group tasks form a server api point of view. any suggestion?

  
  
Posted one year ago

Ah!

  
  
Posted one year ago

Hi @<1582179652133195776:profile|LudicrousPanda17> , I suggest doing a similar filtering in the UI with dev tools open (F12) and see what is sent by the web UI 🙂

  
  
Posted one year ago
549 Views
9 Answers
one year ago
one year ago
Tags
Similar posts