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
Hi All! Is There A Function/Command That Returns Number Of Tasks In A Queue?

Hi all!
Is there a function/command that returns number of tasks in a queue?

Posted 2 years ago
Votes Newest

Answers 7

hi TenderCoyote78
can you please give some more precision about what you intend to achieve ? I am afraid not to well understand your question

Posted 2 years ago

What's the best way to do it?

Posted 2 years ago

Very helpful this was thank you!

Posted 2 years ago

Hi David
So I want to execute more than two tasks simultaneously using an agent
To my understanding one agent can execute only one task at a time and queues the remaining.
So what I want to achieve is to spin up N agents of there are N tasks

Posted 2 years ago

Hi TenderCoyote78 ,

You can get it with the APIClient

from clearml.backend_api.session.client import APIClient api_client = APIClient() tasks_in_queue = api_client.queues.get_by_id(<queue_id>).entries

Posted 2 years ago

Also im looking to start new clearly agents based on the number of tasks

Posted 2 years ago

One agent is assigned to one queue ; so he will execute one task at the time, sequentially, according to their rank in the queue. But you can create as many queues as you want, and assign an agent for each one. You simply fire each agent from a terminal, with a command like :
clearml-agent daemon --queue my_queue_i
if you have more than one gpu, you can also choose for each agent which gpu(s) to allocate

Posted 2 years ago
7 Answers
2 years ago
one year ago
Similar posts