reuse_task=True
does not work correctly in TaskScheduler().add_task()
#1075
Labels
bug
Something isn't working
Describe the bug
A clear and concise description of what the bug is.
The functionality
reuse_task=True
inTaskScheduler().add_task()
does not work as expected. The documentation for the class inclearml.automation.scheduler
states::param reuse_task: If True, re-enqueue the same Task (i.e. do not clone it) every time, default False.
However, if the task is in a completed stated, this fails to work as expected.
This warning happens because this code does not work correctly in
clearml.automation.job
:This code block needs to be modified to reset the task if it is in a state other than
Task.TaskStatusEnum.created
.To reproduce
Exact steps to reproduce the bug. Provide example code if possible.
To reproduce, first create a simple task which we can use for our
schedule_task_id
. Then create a script:Either use a remote queue or spin up the daemon locally twice (one to run the scheduler, one to pick up the tasks). In the clearml console, you will then see a series of completed tasks.
E.g.
Expected behaviour
What is the expected behaviour? What should've happened but didn't?
What should happen is that there is a single task which completes, then the scheduler resets it and enqueues it.
Environment
Related Discussion
If this continues a slack thread, please provide a link to the original slack thread.
The text was updated successfully, but these errors were encountered: