From 5b30fd635acc2d615c849df310a68f803f19d027 Mon Sep 17 00:00:00 2001 From: Helen Qu <8826297+helenqu@users.noreply.github.com> Date: Thu, 25 Aug 2022 19:40:51 -0500 Subject: [PATCH] scone: set gpu header if desired, fix bug arising from not indexing the photometry dirs --- pippin/classifiers/scone.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pippin/classifiers/scone.py b/pippin/classifiers/scone.py index 6a68bd04..1d307852 100644 --- a/pippin/classifiers/scone.py +++ b/pippin/classifiers/scone.py @@ -76,7 +76,7 @@ def __init__(self, name, output_dir, config, dependencies, mode, options, index= def make_sbatch_header(self, option_name, header_dict, use_gpu=False): sbatch_header_template = self.options.get(option_name) - sbatch_header = self.sbatch_cpu_header + sbatch_header = self.sbatch_gpu_header if use_gpu else self.sbatch_cpu_header if sbatch_header_template is not None: self.logger.debug(f"batch file found at {sbatch_header_template}") @@ -288,9 +288,8 @@ def num_jobs_in_queue(self): return self.check_for_job(squeue, self.job_base_name) @staticmethod - def _get_lcdata_paths(sim_dirs): - sim_paths = [f.path for sim_dir in sim_dirs for f in os.scandir(sim_dir)] - lcdata_paths = [path for path in sim_paths if "PHOT" in path] + def _get_lcdata_paths(sim_dir): + lcdata_paths = [f.path for f in os.scandir(sim_dir) if "PHOT" in f.path] return lcdata_paths