clearml icon indicating copy to clipboard operation
clearml copied to clipboard

[Feature request | clearml-agent] allow to stop a specific agent from the command-line option by incorporating arguments to `--stop`

Open talajasi7 opened this issue 3 years ago • 4 comments

For now, the only way I know to kill a particular agent from ClearML API is through the arguments that define it (those that are entered when spinning it up). In addition to this feature, I think the preferable way to stop an agent would be via command-line option like: clearml-agent daemon --stop AGENT_PID It would make a good combination with the list of agent IDs provided by the clearml-agent list command.

talajasi7 avatar Sep 09 '21 07:09 talajasi7

Thanks @talajasi7 this is a great idea, and we will definitely add it. For future reference, currently you can stop a specific instance of the agent if you use the exact same command and add --stop at the end. Example, launching two agents (one per gpu), then stopping agent on gpu "1"

clearml-agent daemon --queue default --gpus 0
clearml-agent daemon --queue default --gpus 1

clearml-agent daemon --queue default --gpus 1 --stop

bmartinn avatar Sep 09 '21 20:09 bmartinn

Thanks @talajasi7 this is a great idea, and we will definitely add it. For future reference, currently you can stop a specific instance of the agent if you use the exact same command and add --stop at the end. Example, launching two agents (one per gpu), then stopping agent on gpu "1"

clearml-agent daemon --queue default --gpus 0
clearml-agent daemon --queue default --gpus 1

clearml-agent daemon --queue default --gpus 1 --stop

Such a command consistently stops the wrong agents from wrong queues.

ColdTeapot273K avatar Jan 23 '24 16:01 ColdTeapot273K

@ColdTeapot273K Perhaps best to open it as an issue for clearml-agent?

ainoam avatar Jan 25 '24 09:01 ainoam

@ColdTeapot273K Which agent version are you using? I just tried the same sequence of commands with the latest agent version (v1.7.0) and it consistently stops the correct agent

jkhenning avatar Jan 25 '24 12:01 jkhenning