diff --git a/bob/bio/base/tools/algorithm.py b/bob/bio/base/tools/algorithm.py index 5a3af5b6444c011b8246dd4d05e9bb5f32f49c12..a819c06f11e9ea5ace4d2d7e555f13e77031b434 100644 --- a/bob/bio/base/tools/algorithm.py +++ b/bob/bio/base/tools/algorithm.py @@ -94,7 +94,7 @@ def project(algorithm, extractor, groups = None, indices = None, force = False): projected_files = fs.projected_list(groups=groups) # select a subset of indices to iterate - if indices != None: + if indices is not None: index_range = range(indices[0], indices[1]) logger.info("- Projection: splitting of index range %s", str(indices)) else: @@ -217,7 +217,7 @@ def enroll(algorithm, extractor, compute_zt_norm, indices = None, groups = ['dev for group in groups: model_ids = fs.model_ids(group) - if indices != None: + if indices is not None: model_ids = model_ids[indices[0]:indices[1]] logger.info("- Enrollment: splitting of index range %s", str(indices)) @@ -248,7 +248,7 @@ def enroll(algorithm, extractor, compute_zt_norm, indices = None, groups = ['dev for group in groups: t_model_ids = fs.t_model_ids(group) - if indices != None: + if indices is not None: t_model_ids = t_model_ids[indices[0]:indices[1]] logger.info("- Enrollment: splitting of index range %s", str(indices)) diff --git a/bob/bio/base/tools/extractor.py b/bob/bio/base/tools/extractor.py index 87e7d8ef22e260704e2936b3071d3191b06ead1c..08a659cdc1733ec172c4e3e1c19b6f01924c137f 100644 --- a/bob/bio/base/tools/extractor.py +++ b/bob/bio/base/tools/extractor.py @@ -85,7 +85,7 @@ def extract(extractor, preprocessor, groups=None, indices = None, force = False) feature_files = fs.feature_list(groups=groups) # select a subset of indices to iterate - if indices != None: + if indices is not None: index_range = range(indices[0], indices[1]) logger.info("- Extraction: splitting of index range %s" % str(indices)) else: diff --git a/bob/bio/base/tools/grid.py b/bob/bio/base/tools/grid.py index 52e1ce68ee115d716691f341185db3be87885c9c..f9f1620c5e99519b690f95ef3e657074ac17c89e 100644 --- a/bob/bio/base/tools/grid.py +++ b/bob/bio/base/tools/grid.py @@ -63,7 +63,7 @@ class GridSubmission: import gridtk # setup logger - bob.core.log.set_verbosity_level(bob.core.log.setup("gridtk"), args.verbose) + bob.core.log.set_verbosity_level(bob.core.log.setup("gridtk"), min(args.verbose,2)) Manager = gridtk.local.JobManagerLocal if args.grid.is_local() else gridtk.sge.JobManagerSGE self.job_manager = Manager(database = args.gridtk_database_file, wrapper_script=jman) self.submitted_job_ids = [] diff --git a/bob/bio/base/tools/preprocessor.py b/bob/bio/base/tools/preprocessor.py index 067b9ccd4461b6d0253ee655ab095b445b356fcd..07aa4b71d9068f877341e5f4eb70a5a64ab351e8 100644 --- a/bob/bio/base/tools/preprocessor.py +++ b/bob/bio/base/tools/preprocessor.py @@ -37,7 +37,7 @@ def preprocess(preprocessor, groups = None, indices = None, force = False): preprocessed_data_files = fs.preprocessed_data_list(groups=groups) # select a subset of keys to iterate - if indices != None: + if indices is not None: index_range = range(indices[0], indices[1]) logger.info("- Preprocessing: splitting of index range %s", str(indices)) else: diff --git a/bob/bio/base/tools/scoring.py b/bob/bio/base/tools/scoring.py index c55149a9eb2a86bccb9beb63ac65bfa64727a7e2..136867e17afa976bb11cebf7a0eabf582f761928 100644 --- a/bob/bio/base/tools/scoring.py +++ b/bob/bio/base/tools/scoring.py @@ -251,12 +251,12 @@ def compute_scores(algorithm, compute_zt_norm, force = False, indices = None, gr for group in groups: # get model ids model_ids = fs.model_ids(group) - if indices != None: + if indices is not None: model_ids = model_ids[indices[0]:indices[1]] logger.info("- Scoring: splitting of index range %s", str(indices)) if compute_zt_norm: t_model_ids = fs.t_model_ids(group) - if indices != None: + if indices is not None: t_model_ids = t_model_ids[indices[0]:indices[1]] # compute A scores