riga / law

Build large-scale task workflows: luigi + job submission + remote targets + environment sandboxing using Docker/Singularity
http://law.readthedocs.io
BSD 3-Clause "New" or "Revised" License
98 stars 41 forks source link

Exception when cancelling slurm jobs #116

Closed lmoureaux closed 2 years ago

lmoureaux commented 2 years ago

I get an exception in law when using the --cancel-jobs option with slurm:

Traceback (most recent call last):
  File "/afs/desy.de/user/r/riegerma/public/law_sw/luigi/luigi/worker.py", line 199, in run
    new_deps = self._run_get_new_deps()
  File "/afs/desy.de/user/r/riegerma/public/law_sw/luigi/luigi/worker.py", line 141, in _run_get_new_deps
    task_gen = self.task.run()
  File "/afs/desy.de/user/r/riegerma/public/law_sw/law/law/workflow/remote.py", line 448, in run
    self.cancel()
  File "/afs/desy.de/user/r/riegerma/public/law_sw/law/law/workflow/remote.py", line 529, in cancel
    len(errors), len(job_ids), task.task_id))
TypeError: object of type 'filter' has no len()
riga commented 2 years ago

Thanks for reporting @lmoureaux ! 🎉

Did you also check if this happens on master? Also, which python version are you using?

riga commented 2 years ago

I just pushed the fix to the master and updated the public checkout at /afs/desy.de/user/r/riegerma/public/law_sw. Can you give it a spin?

lmoureaux commented 2 years ago

I can confirm that the error no longer occurs. Thanks for the fix @riga!