From 8023a85b0711afb9f2df724ab2ed75961627ae46 Mon Sep 17 00:00:00 2001 From: Tai Sakuma Date: Mon, 11 Jun 2018 20:43:56 +0100 Subject: [PATCH] update fw --- atcmsedm/fw.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/atcmsedm/fw.py b/atcmsedm/fw.py index 53559d1..8a7f2ef 100644 --- a/atcmsedm/fw.py +++ b/atcmsedm/fw.py @@ -11,6 +11,7 @@ import pickle import alphatwirl +from alphatwirl.misc.deprecation import _deprecated_class_method_option from .yes_no import query_yes_no from . import cmsedm @@ -30,7 +31,7 @@ class AtCMSEDM(object): Args: quiet (bool): don't show progress bars if True parallel_mode (str): 'multiprocessing', 'subprocess', 'htcondor' - htcondor_job_desc_extra (list): lines to be added to HTCondor job description + dispatcher_options (dict): options to dispatcher process (int): the number of processes for the 'multiprocessing' mode user_modules (list of str): names of python modules to be copied for the 'subprocess' mode max_events_per_dataset (int): maximum number of events per data set @@ -41,10 +42,12 @@ class AtCMSEDM(object): profile_out_path (bool): path to store the result of the profile. stdout if None """ + @_deprecated_class_method_option('htcondor_job_desc_extra', msg='use dispatcher_options instead') def __init__(self, quiet=False, parallel_mode='multiprocessing', htcondor_job_desc_extra=[ ], + dispatcher_options=dict(), process=4, user_modules=set(), max_events_per_dataset=-1, @@ -57,11 +60,12 @@ def __init__(self, user_modules = set(user_modules) user_modules.add('atcmsedm') self.parallel = alphatwirl.parallel.build_parallel( - parallel_mode=parallel_mode, - quiet=quiet, - processes=process, - user_modules=user_modules, - htcondor_job_desc_extra=htcondor_job_desc_extra + parallel_mode=parallel_mode, + quiet=quiet, + processes=process, + user_modules=user_modules, + ## htcondor_job_desc_extra=htcondor_job_desc_extra, + dispatcher_options=dispatcher_options ) self.max_events_per_dataset = max_events_per_dataset self.max_events_per_process = max_events_per_process @@ -102,7 +106,7 @@ def _configure(self, datasets, reader_collector_pairs): maxFiles=self.max_files_per_dataset, maxFilesPerRun=self.max_files_per_process ) - eventReader = alphatwirl.loop.EventsInDatasetReader( + eventReader = alphatwirl.loop.EventDatasetReader( eventLoopRunner=eventLoopRunner, reader=reader_top, collector=collector_top,