From 29e17a6bb11528f8b3928a751768242e273ee631 Mon Sep 17 00:00:00 2001 From: iguinn Date: Fri, 1 Nov 2024 10:15:22 -0700 Subject: [PATCH 1/4] Default parallel to False --- src/pygama/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pygama/utils.py b/src/pygama/utils.py index 888ca396c..b6b73d26c 100644 --- a/src/pygama/utils.py +++ b/src/pygama/utils.py @@ -51,7 +51,7 @@ class NumbaPygamaDefaults(MutableMapping): """ def __init__(self) -> None: - self.parallel: bool = getenv_bool("PYGAMA_PARALLEL", default=True) + self.parallel: bool = getenv_bool("PYGAMA_PARALLEL", default=False) self.fastmath: bool = getenv_bool("PYGAMA_FASTMATH", default=True) def __getitem__(self, item: str) -> Any: From 2db25b8aba2d1bd0b7346e4471a2ed050f7f10cb Mon Sep 17 00:00:00 2001 From: iguinn Date: Fri, 1 Nov 2024 11:27:39 -0700 Subject: [PATCH 2/4] Changes needed for changes to LGDO iterator --- src/pygama/flow/data_loader.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pygama/flow/data_loader.py b/src/pygama/flow/data_loader.py index aa65d2a3c..53c103c57 100644 --- a/src/pygama/flow/data_loader.py +++ b/src/pygama/flow/data_loader.py @@ -1411,7 +1411,7 @@ def load_iterator( ) for file in gb.groups.keys() ] - tb_names += [self.filedb.get_table_name(tier, tb)] * len(gb) + tb_names += [ [self.filedb.get_table_name(tier, tb)] ]* len(gb) idx_list += [ list(entry_list.loc[i, f"{level}_idx"]) for i in gb.groups.values() @@ -1509,7 +1509,7 @@ def browse( ) for file in gb.groups.keys() ] - tb_names += [self.filedb.get_table_name(tier, tb)] * len(gb) + tb_names += [ [self.filedb.get_table_name(tier, tb)] ]* len(gb) idx_list += [ list(entry_list.loc[i, f"{parent}_idx"]) for i in gb.groups.values() ] From ebed9fd4854ef74185b544d42e4c1db6679545dc Mon Sep 17 00:00:00 2001 From: iguinn Date: Fri, 1 Nov 2024 11:27:56 -0700 Subject: [PATCH 3/4] Fixed math defaults test --- tests/test_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_utils.py b/tests/test_utils.py index ba70ad382..95e3f1b2c 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -3,7 +3,7 @@ def test_math_numba_defaults(): assert pgu.numba_math_defaults_kwargs.fastmath - assert pgu.numba_math_defaults_kwargs.parallel + assert not pgu.numba_math_defaults_kwargs.parallel pgu.numba_math_defaults.fastmath = False - assert ~pgu.numba_math_defaults.fastmath + assert not pgu.numba_math_defaults.fastmath From ddb25b7cb9ef865f78f500f2713ac97c953bac22 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 1 Nov 2024 18:28:36 +0000 Subject: [PATCH 4/4] style: pre-commit fixes --- src/pygama/flow/data_loader.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pygama/flow/data_loader.py b/src/pygama/flow/data_loader.py index 53c103c57..e2c9f6c5f 100644 --- a/src/pygama/flow/data_loader.py +++ b/src/pygama/flow/data_loader.py @@ -1411,7 +1411,7 @@ def load_iterator( ) for file in gb.groups.keys() ] - tb_names += [ [self.filedb.get_table_name(tier, tb)] ]* len(gb) + tb_names += [[self.filedb.get_table_name(tier, tb)]] * len(gb) idx_list += [ list(entry_list.loc[i, f"{level}_idx"]) for i in gb.groups.values() @@ -1509,7 +1509,7 @@ def browse( ) for file in gb.groups.keys() ] - tb_names += [ [self.filedb.get_table_name(tier, tb)] ]* len(gb) + tb_names += [[self.filedb.get_table_name(tier, tb)]] * len(gb) idx_list += [ list(entry_list.loc[i, f"{parent}_idx"]) for i in gb.groups.values() ]