clearml
clearml copied to clipboard
mark_completed() causes kernel to die
Thank you for helping us making ClearML better!
Describe the bug
task.mark_completed() causes the kernel (in .ipynb and .py without as well) to die task.close() works better - kernel doesn't die
To reproduce
import matplotlib.pyplot as plt
import numpy as np
from clearml import Task
import socket
task = Task.init(project_name='Szemet', task_name='loo clean')
task.set_parameter('hostname', socket.gethostname())
plt.plot(np.random.random(10))
plt.show()
task.mark_completed()
Expected behaviour
Kernel should continue running, with task marked as completed
Environment
- Server type - app.clear.ml
- ClearML SDK Version 1.6.4
- Python Version - 3.9.12
- OS (Windows \ Linux \ Macos) - Ubuntu 22.04
Related Discussion
Similar behaviour was reported by others: https://clearml.slack.com/archives/CTK20V944/p1655149087316649 and https://clearml.slack.com/archives/CTK20V944/p1653505498243069
Hi @gorogm,
Yup :smile: that indeed seems to happen and it's not supposed to.
We'll make sure to fix it
Hi @gorogm,
I had a chat with our developers and it actually is by design that this happens. basically, task.mark_completed() is meant for scripts that manage other tasks (such as a hyperparameter optimization controller or a pipeline controller). The correct method to use is task.close() to close the currently running task. We will update the docs to reflect that usage, but as it stands, please use task.close()
Makes sense?
Very nice, thanks a lot!! :)