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, I'M Using

hello, I'm using Task._query_tasks(project_name=...) to iterate on tasks, but I'm getting only the first 500 tasks of my project and I don't know how to get more, like the API behind is paginated but the SDK doesn't support it maybe? is there a way to iterate on more than 500 tasks?
(I get the same thing with Task.query_tasks() )

  
  
Posted one year ago
Votes Newest

Answers 5


Hi VirtuousFish83 ,

You can do it using the API directly tasks.get_all is what you're looking for
https://clear.ml/docs/latest/docs/references/api/tasks#post-tasksget_all

  
  
Posted one year ago

thanks, is there a way to do it with the SDK ? maybe override the page size ?

  
  
Posted one year ago

thanks that works ! perfect

  
  
Posted one year ago

managed a workaround thanks to the API doc, if someone encouters the same bug:
tasks = [] page = 0 while True: page_tasks = Task._query_tasks(project_name=project, system_tags=[] if archived else ['-archived'], page=page, page_size=500) tasks += page_tasks page += 1 if len(page_tasks) < 500: break

  
  
Posted one year ago

Hi Mathis, actually, we fixed this in our latest SDK! you can use Task.query_tasks() and you'll get the id's of all the tasks that match the query. The reason we don't get task objects themselves is that it can be quite large and can take a long time.

  
  
Posted one year ago
650 Views
5 Answers
one year ago
one year ago
Tags