Hmm should be pushed later today, meanwhile:
` from clearml import Task
from clearml.automation.trigger import TriggerScheduler
def func(*args, **kwargs):
print('test', args, kwargs)
if name == 'main':
s = TriggerScheduler(pooling_frequency_minutes=1.0)
s.add_model_trigger(
name='trigger 1', schedule_function=func,
trigger_project='examples', trigger_on_tags=['deploy']
)
s.add_model_trigger(
name='trigger 2',
schedule_task_id='3f7458549e814591b003a87f63c333c6',
schedule_queue='moshik',
trigger_project='examples', trigger_on_tags=['deploy']
)
s.add_dataset_trigger(
name='trigger 3', schedule_function=func,
trigger_project='datasets', trigger_on_tags=['deploy']
)
s.add_task_trigger(
name='trigger 4', schedule_function=func,
trigger_project='examples',
trigger_on_metric='epoch_accuracy', trigger_on_variant='epoch_accuracy',
trigger_on_sign='max', trigger_on_threshold=0.99
)
s.start() `
` from clearml import Task
from clearml.automation.scheduler import TaskScheduler
def func():
print('test')
if name == 'main':
s = TaskScheduler()
s.add_task(name='example job', schedule_function=func, minute=10)
s.start() `