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
Hi, I Am Trying The Triggerscheduler To Catch When A User Add Specific Tag To A Task. I Used The Below Code But The Schedule_Function Is Not Called When Adding Tags To Task (It Seems The Task.Last_Update Is Not Modified After Adding Tag)

Hi,
I am trying the TriggerScheduler to catch when a user add specific tag to a task.
I used the below code but the schedule_function is not called when adding tags to task (it seems the task.last_update is not modified after adding tag)
` def on_task_published(*args, **kwargs):
print("task_trigger called")

trigger.add_task_trigger(
name="run1",
schedule_function=on_task_published,
schedule_queue="pipelines",
trigger_on_tags=["run1"],
) `Do I use the correct parameters for the add_task_trigger function?

  
  
Posted 2 years ago
Votes Newest

Answers 10


Could you try and create a new task with the tag already added? Instead of adding a tag on an existing task. It should work then. If it does, this might be a bug? Or if not, a good feature to exist 🙂

  
  
Posted 2 years ago

Hi,
res is None but the trigger works when doing other changes so i guess it was added.

  
  
Posted 2 years ago

Can you elaborate a bit more, I don't quite understand yet. So it works when you update an existing task by adding a tag to it, but it doesn't work when adding a tag for the first time?

  
  
Posted 2 years ago

btw Ofir, can you sent me your different clearml packages versions ?

  
  
Posted 2 years ago

hi ApprehensiveSeahorse83
i am working too on your issue. It seems that there is a wrong behavior here, so we need to get a bit deeper to understand what's happening. We will keep you updated asap, thanks for your contribution ! 🙏

  
  
Posted 2 years ago

no, it work if the tag exist and i do other change to the task. but if the task does not have the task and I just add the tag the event is not trigger.

  
  
Posted 2 years ago

When updating task with that tag the event is triggered but on the first time adding the tag it does not work.

  
  
Posted 2 years ago

hey ApprehensiveSeahorse83
can you please check that the trigger is correctly added ? Simply retrieve the return value of add_task_trigger
res = trigger.add_task_trigger( .....
print(f'Trigger correctly added ? {res}')

  
  
Posted 2 years ago

yes i have the behavior. I think that we have a bug. We will release a fix and will keep you updated 🙂
can you please open a github issue ? Of course if it is a problem, i can do it for you, just let me know 🙂
http://github.com/allegroai/clearml/issues

  
  
Posted 2 years ago
1K Views
10 Answers
2 years ago
one year ago
Tags