There is now a function called mark_completed() which can be used:
mark_completed()
t = clearml.Task.get_task("<your-task-id>") t.mark_completed()