From ad9e2dc77ac1766116587988e6118be20151df51 Mon Sep 17 00:00:00 2001 From: Joe Zuntz Date: Thu, 11 Jul 2024 12:09:31 +0200 Subject: [PATCH 1/8] Rewrite constructors for ceci v2 --- src/rail/estimation/algos/gpz.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/rail/estimation/algos/gpz.py b/src/rail/estimation/algos/gpz.py index 6e591f8..3c30edb 100644 --- a/src/rail/estimation/algos/gpz.py +++ b/src/rail/estimation/algos/gpz.py @@ -73,10 +73,10 @@ class GPzInformer(CatInformer): replace_error_vals=Param(list, default_err_repl, msg="list of values to replace negative and nan mag err values") ) - def __init__(self, args, comm=None): + def __init__(self, args, **kwargs): """ Constructor Do CatInformer specific initialization""" - CatInformer.__init__(self, args, comm=comm) + super().__init__(self, args, **kwargs) self.zgrid = None def run(self): @@ -144,10 +144,10 @@ class GPzEstimator(CatEstimator): replace_error_vals=Param(list, default_err_repl, msg="list of values to replace negative and nan mag err values") ) - def __init__(self, args, comm=None): + def __init__(self, args, **kwargs): """ Constructor: Do CatEstimator specific initialization """ - CatEstimator.__init__(self, args, comm=comm) + super().__init__(self, args, **kwargs) self.zgrid = None # check that lengths of bands, err_bands, and replace_error_vals match if not np.logical_and(len(self.config.bands) == len(self.config.err_bands), From f746f2c0d1e6af4311db3e9ed4220fb1d34c2a8d Mon Sep 17 00:00:00 2001 From: Joe Zuntz Date: Thu, 11 Jul 2024 13:30:33 +0200 Subject: [PATCH 2/8] Fix mis-use of super() --- src/rail/estimation/algos/gpz.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rail/estimation/algos/gpz.py b/src/rail/estimation/algos/gpz.py index 3c30edb..0a6bfb2 100644 --- a/src/rail/estimation/algos/gpz.py +++ b/src/rail/estimation/algos/gpz.py @@ -76,7 +76,7 @@ class GPzInformer(CatInformer): def __init__(self, args, **kwargs): """ Constructor Do CatInformer specific initialization""" - super().__init__(self, args, **kwargs) + super().__init__(args, **kwargs) self.zgrid = None def run(self): @@ -147,7 +147,7 @@ class GPzEstimator(CatEstimator): def __init__(self, args, **kwargs): """ Constructor: Do CatEstimator specific initialization """ - super().__init__(self, args, **kwargs) + super().__init__(args, **kwargs) self.zgrid = None # check that lengths of bands, err_bands, and replace_error_vals match if not np.logical_and(len(self.config.bands) == len(self.config.err_bands), From 73b97bb9f7a75200dceda44d89fc51a03779f9b4 Mon Sep 17 00:00:00 2001 From: Joe Zuntz Date: Thu, 11 Jul 2024 14:01:49 +0200 Subject: [PATCH 3/8] Temporarily switch to use the ceci2 branch of rail_base in testing to demonstrate things are working --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f659ea0..0421c26 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,7 +18,7 @@ dynamic = ["version"] dependencies = [ "scikit-learn", - "pz-rail-base", + "ceci2 @ https://github.com/LSSTDESC/rail_base", "qp-prob[full]", ] From cf4ab6d1aa1917233ecf6313e597399c7f83799b Mon Sep 17 00:00:00 2001 From: Joe Zuntz Date: Thu, 11 Jul 2024 14:04:41 +0200 Subject: [PATCH 4/8] Fix error in pyproject.toml github spec --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 0421c26..a238a6a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,7 +18,7 @@ dynamic = ["version"] dependencies = [ "scikit-learn", - "ceci2 @ https://github.com/LSSTDESC/rail_base", + "ceci2 @ git+https://github.com/LSSTDESC/rail_base", "qp-prob[full]", ] From 26e7f794209b92e5fd5edb45b1998d62752f4557 Mon Sep 17 00:00:00 2001 From: Joe Zuntz Date: Thu, 11 Jul 2024 14:41:22 +0200 Subject: [PATCH 5/8] Fix error in pyproject.toml github spec --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index a238a6a..4091b00 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,7 +18,7 @@ dynamic = ["version"] dependencies = [ "scikit-learn", - "ceci2 @ git+https://github.com/LSSTDESC/rail_base", + "pz_rail_base @ git+https://github.com/LSSTDESC/rail_base@ceci2", "qp-prob[full]", ] From 24cc3bd205291d36b2148976fc285d4e1b16b66e Mon Sep 17 00:00:00 2001 From: hangqianjun Date: Wed, 17 Jul 2024 01:35:05 -0700 Subject: [PATCH 6/8] fix dependence on rail_base --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 4091b00..f73f3c4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,7 +18,7 @@ dynamic = ["version"] dependencies = [ "scikit-learn", - "pz_rail_base @ git+https://github.com/LSSTDESC/rail_base@ceci2", + "pz_rail_base", "qp-prob[full]", ] From 5fcc648b54559b1a7c94c167f26c3b6dab594263 Mon Sep 17 00:00:00 2001 From: Joe Zuntz Date: Wed, 17 Jul 2024 09:35:34 +0100 Subject: [PATCH 7/8] Move to pypi pz-rail-base --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 4091b00..4eb3760 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,7 +18,7 @@ dynamic = ["version"] dependencies = [ "scikit-learn", - "pz_rail_base @ git+https://github.com/LSSTDESC/rail_base@ceci2", + "pz-rail-base>=1.0.3", "qp-prob[full]", ] From 8c821b3e661559cd66b49e9f3efbcb276ac3b638 Mon Sep 17 00:00:00 2001 From: hangqianjun Date: Wed, 17 Jul 2024 01:41:18 -0700 Subject: [PATCH 8/8] fix dependence on rail-base --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f73f3c4..f659ea0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,7 +18,7 @@ dynamic = ["version"] dependencies = [ "scikit-learn", - "pz_rail_base", + "pz-rail-base", "qp-prob[full]", ]