pprice@tiger-sumire:~/LSST/pipe/drivers (tickets/DM-7134=) $ git sub-patch
|
commit a04ae120c7ae27811bebcf7e2b4036ea8c6c039c
|
Author: Paul Price <price@astro.princeton.edu>
|
Date: Thu Aug 4 15:51:41 2016 -0400
|
|
singleFrameDriver: restore lost parallelism
|
|
The ButlerInitializedTaskRunner used to run the SingleFrameDriverTask
|
doesn't inherit from the BatchTaskRunner, which is what provides
|
parallelism. Made a new SingleFrameTaskRunner with the characteristics
|
of both BatchTaskRunner and ButlerInitializedTaskRunner using
|
multiple inheritance (safe without further work because the
|
specialisations in those TaskRunners are orthogonal).
|
|
diff --git a/python/lsst/pipe/drivers/singleFrameDriver.py b/python/lsst/pipe/drivers/singleFrameDriver.py
|
index b13f64e..60257d2 100644
|
--- a/python/lsst/pipe/drivers/singleFrameDriver.py
|
+++ b/python/lsst/pipe/drivers/singleFrameDriver.py
|
@@ -1,7 +1,7 @@
|
from lsst.pipe.base import ArgumentParser, ButlerInitializedTaskRunner
|
from lsst.pipe.tasks.processCcd import ProcessCcdTask
|
from lsst.pex.config import Config, Field, ConfigurableField, ListField
|
-from lsst.ctrl.pool.parallel import BatchParallelTask
|
+from lsst.ctrl.pool.parallel import BatchParallelTask, BatchTaskRunner
|
|
class SingleFrameDriverConfig(Config):
|
processCcd = ConfigurableField(target=ProcessCcdTask, doc="CCD processing task")
|
@@ -9,12 +9,17 @@ class SingleFrameDriverConfig(Config):
|
ccdKey = Field(dtype=str, default="ccd", doc="DataId key corresponding to a single sensor")
|
|
|
+class SingleFrameTaskRunner(BatchTaskRunner, ButlerInitializedTaskRunner):
|
+ """Run batches, and initialize Task using a butler"""
|
+ pass
|
+
|
+
|
class SingleFrameDriverTask(BatchParallelTask):
|
"""Process CCDs in parallel
|
"""
|
ConfigClass = SingleFrameDriverConfig
|
_DefaultName = "singleFrameDriver"
|
- RunnerClass = ButlerInitializedTaskRunner
|
+ RunnerClass = SingleFrameTaskRunner
|
|
def __init__(self, butler=None, refObjLoader=None, *args, **kwargs):
|
"""!
|
Jim Bosch, would you please review this? Here's the patch:
pprice@tiger-sumire:~/LSST/pipe/drivers (tickets/DM-7134=) $ git sub-patch
commit a04ae120c7ae27811bebcf7e2b4036ea8c6c039c
Author: Paul Price <price@astro.princeton.edu>
Date: Thu Aug 4 15:51:41 2016 -0400
singleFrameDriver: restore lost parallelism
The ButlerInitializedTaskRunner used to run the SingleFrameDriverTask
doesn't inherit from the BatchTaskRunner, which is what provides
parallelism. Made a new SingleFrameTaskRunner with the characteristics
of both BatchTaskRunner and ButlerInitializedTaskRunner using
multiple inheritance (safe without further work because the
specialisations in those TaskRunners are orthogonal).
diff --git a/python/lsst/pipe/drivers/singleFrameDriver.py b/python/lsst/pipe/drivers/singleFrameDriver.py
index b13f64e..60257d2 100644
--- a/python/lsst/pipe/drivers/singleFrameDriver.py
+++ b/python/lsst/pipe/drivers/singleFrameDriver.py
@@ -1,7 +1,7 @@
from lsst.pipe.base import ArgumentParser, ButlerInitializedTaskRunner
from lsst.pipe.tasks.processCcd import ProcessCcdTask
from lsst.pex.config import Config, Field, ConfigurableField, ListField
-from lsst.ctrl.pool.parallel import BatchParallelTask
+from lsst.ctrl.pool.parallel import BatchParallelTask, BatchTaskRunner
class SingleFrameDriverConfig(Config):
processCcd = ConfigurableField(target=ProcessCcdTask, doc="CCD processing task")
@@ -9,12 +9,17 @@ class SingleFrameDriverConfig(Config):
ccdKey = Field(dtype=str, default="ccd", doc="DataId key corresponding to a single sensor")
+class SingleFrameTaskRunner(BatchTaskRunner, ButlerInitializedTaskRunner):
+ """Run batches, and initialize Task using a butler"""
+ pass
+
+
class SingleFrameDriverTask(BatchParallelTask):
"""Process CCDs in parallel
"""
ConfigClass = SingleFrameDriverConfig
_DefaultName = "singleFrameDriver"
- RunnerClass = ButlerInitializedTaskRunner
+ RunnerClass = SingleFrameTaskRunner
def __init__(self, butler=None, refObjLoader=None, *args, **kwargs):
"""!