Are you talking about failing a task from it's own code?
Yes, fail it and then close it
Hi ImmensePenguin78 - what status are you looking for?
Hi SuccessfulKoala55 ,
failed. I read in the docs I can use mark_failed .
How should I use it correctly with task.close()?
ImmensePenguin78 I think you can get it with the
APIClient , you can add
force to the call:
` from clearml import Task
from clearml.backend_api.session.client import APIClient
api_client = APIClient()
t = Task.init(project_name="Your project", task_name="Your task name")
api_client.tasks.failed(t.id, force=True, status_reason="Your status reason", status_message="Your status message") `
Or should the task.close appear before the task.mark_failed?
Yes it should