Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New config param to define point estimates to calculate when running a CatEstimator stage #29

Merged
merged 1 commit into from
Aug 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/rail/core/common_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@
err_bands=Param(list, lsst_mag_err_cols, msg="Names of columns for magnitgude errors by filter band"),
mag_limits=Param(dict, lsst_def_maglims, msg="Limiting magnitdues by filter"),
ref_band=Param(str, "mag_i_lsst", msg="band to use in addition to colors"),
redshift_col=Param(str, 'redshift', msg="name of redshift column")
redshift_col=Param(str, 'redshift', msg="name of redshift column"),
calculated_point_estimates=Param(dtype=list, default=[],
msg="List of strings defining which point estimates to automatically calculate using `qp.Ensemble`. Options include, 'mean', 'mode', 'median'.")
)


Expand Down
7 changes: 6 additions & 1 deletion src/rail/estimation/estimator.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
Abstract base classes defining redshift estimations Informers and Estimators
"""

from rail.core.common_params import SHARED_PARAMS
from rail.core.data import TableHandle, QPHandle, ModelHandle
from rail.core.stage import RailStage

import gc

class CatEstimator(RailStage):
Expand All @@ -19,7 +21,10 @@ class CatEstimator(RailStage):

name = 'CatEstimator'
config_options = RailStage.config_options.copy()
config_options.update(chunk_size=10000, hdf5_groupname=str)
config_options.update(
chunk_size=10000,
hdf5_groupname=SHARED_PARAMS['hdf5_groupname'],
calculated_point_estimates=SHARED_PARAMS['calculated_point_estimates'])
inputs = [('model', ModelHandle),
('input', TableHandle)]
outputs = [('output', QPHandle)]
Expand Down
Loading