JobMonitor.cancel()
Removes the job from the queue if it’s queued, or terminates it if it’s currently running.
Example
Section titled “Example”train_job.cancel()Removes the job from the queue if it’s queued, or terminates it if it’s currently running.
train_job.cancel()