question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

End script without ending task

See original GitHub issue

I initialize a task locally via Task.init() and then submit training jobs from the python script to the SLURM cluster. Each SLURM job knows the task ID and obtains the task via Task.get_task(). However, as soon as the main script finishes, the slurm scripts fail stating:

- clearml.Task - WARNING - ### TASK STOPPED - USER ABORTED - STATUS CHANGED ###

Is there a way to end the main script without changing the task status?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
aschmiricommented, Jul 22, 2021

Calling init() in the Slurm job solved the first issue (before I only called get_task()).

Regarding the stopping issue, I found a workaround. The master process will usually be stopped, but I always have a “merging” script called after the SLURM trainings, which now ends the task.

So all issues addressed, thanks a lot!

0reactions
bmartinncommented, Jul 22, 2021

The master process will usually be stopped, but I always have a “merging” script called after the SLURM trainings, which now ends the task.

Nice!!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I skip the rest of a script without exiting the invoking ...
Use return . The return bash builtin will exit the sourced script without stopping the calling (parent/sourcing) script. From man bash:.
Read more >
How do I exit a process in terminal without killing it? [duplicate]
What you are looking for is sending the current foreground job to the background. You can simply achieve this by: suspending the current...
Read more >
Any way to exit bash script, but not quitting the terminal
the exit command should not terminate your terminal session/login. if you use exit 0 to terminate the script after success, when you run...
Read more >
Exit - Terminate a script - Windows CMD - SS64.com
If quitting CMD.EXE, sets the process exit code no. To close an interactive command prompt, the keyboard shortcut ALT + F4 is an...
Read more >
How to Use the PowerShell Exit Command and Friends
Learn about all the ways to exit a PowerShell script or session. Let's get ready to terminate some PowerShell sessions and scripts!
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found