camall3n / onager

Lightweight python library for launching experiments and tuning hyperparameters, either locally or on a cluster
MIT License
20 stars 4 forks source link

List subcommand reports incorrect commands when two jobs have the same name #9

Open camall3n opened 4 years ago

camall3n commented 4 years ago

Issue: If prelaunch/launch are run twice with the same jobname, list will report that the first job used the commands from the second job

Expected: Either list does not report the first job, or it reports the original commands.

Python: python 3.7 Library version: 0.1.0.a

To reproduce:

$ thoth prelaunch +command sleep +jobname sleepy +arg '' {1..5}
$ thoth launch --backend slurm --jobname sleepy
$ thoth prelaunch +command sleep +jobname sleepy +arg '' {6..10}
$ thoth launch --backend slurm --jobname sleepy
$ thoth list

Output:

  job_id    task_id  jobname    command      tag
--------  ---------  ---------  -----------  -----
13434297          1  sleepy     'sleep  6'
13434297          2  sleepy     'sleep  7'
13434297          3  sleepy     'sleep  8'
13434297          4  sleepy     'sleep  9'
13434297          5  sleepy     'sleep  10'
13434299          1  sleepy     'sleep  6'
13434299          2  sleepy     'sleep  7'
13434299          3  sleepy     'sleep  8'
13434299          4  sleepy     'sleep  9'
13434299          5  sleepy     'sleep  10'
camall3n commented 4 years ago

Verified on slurm backend