pylada/pylada-light

%launch scattered fails with new version of pylada (after June 2018)

ftherrien opened this issue · 5 comments

We get the following error when launching jobs with:

%launch scattered --account=NRELMatDB --walltime=48:00:00 --ppn=24 --queue=batch-h --feature=haswell --nbprocs=48

Error message:

/home/pgorai/.conda-envs/prashun/lib/python2.7/site-packages/pylada/ipython/launch/scattered.pyc in launch(self, event, jobfolders)
     47     from ... import pbs_string, default_pbs, qsub_exe, default_comm
     48     from . import get_walltime, get_mppalloc, get_queues, scattered_script
---> 49     from .. import logger, Pylada
     50
     51     if not hasattr(pylada, 'ipython_qstat'):

ImportError: cannot import name Pylada

Reverting to may 30th commit (Bug fix in the logger for the mpi hostfile) the error does not occur. Any idea what this could be?

The Pylada class was moved to magic.py (in commit 0e3261a) but magic.py is not imported in 'init.py' directly. So either we add the following to the beginning of 'init.py':
from magics import Pylada
Or we replace L49 of scattered.py by:

from .. import logger
from ..magics import Pylada

What do you think?

Could try just removing Pylada from the imports? it does not look like it is used anywhere.

Yes that works! Sorry, I did not notice it was not even using it!

Cool. I can't test that %launch actually works. I don't have pylada installed on cluster. So I'll let you merge when you think it's good!