-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* added pipeline stuff * WIP, playing with pipeline building cli * added scripts.build_pipeline_yaml to testing * Added build_pipe and run_stage to rail cli * Added name_utils and catalog_utils to src/rail/utils * fix up RailPipeline.build_and_write * fix up TrainZPipeline * Added build_and_read_pipelines to testing_utils * Added test for train_z * added build_pipeline to scripts * tweaks to name_utils * fixes for unit tests * WIP sid's changes for RailProject * WIP more of Sid's changes * Working version of name_utils, train_z_pipeline and testing of same * remove old version of test_pipeline * WIP on name_utils * simplify naming * WIP, improvements to making rail pipelines * WIP, cleaning up interfaces * WIP, cleaning up interfaces * Tweaking RailPipeline * minor changes for pylint * keep track of active catalog tag * Fix up build_pipe command * add hdf5_groupname to catalog utils * Fix imports in stage * Fix up coverage
- Loading branch information
Showing
12 changed files
with
398 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#!/usr/bin/env python | ||
# coding: utf-8 | ||
|
||
# Prerquisites, os, and numpy | ||
import os | ||
import numpy as np | ||
|
||
# Various rail modules | ||
from rail.estimation.algos.train_z import TrainZInformer, TrainZEstimator | ||
from rail.evaluation.single_evaluator import SingleEvaluator | ||
|
||
from rail.core.stage import RailStage, RailPipeline | ||
|
||
import ceci | ||
|
||
|
||
class TrainZPipeline(RailPipeline): | ||
|
||
default_input_dict = dict( | ||
input_train='dummy.in', | ||
input_test='dummy.in', | ||
) | ||
|
||
def __init__(self): | ||
RailPipeline.__init__(self) | ||
|
||
DS = RailStage.data_store | ||
DS.__class__.allow_overwrite = True | ||
|
||
self.inform_trainz = TrainZInformer.build( | ||
aliases=dict(input='input_train'), | ||
hdf5_groupname='', | ||
) | ||
|
||
self.estimate_trainz = TrainZEstimator.build( | ||
aliases=dict(input='input_test'), | ||
connections=dict( | ||
model=self.inform_trainz.io.model, | ||
), | ||
hdf5_groupname='', | ||
) | ||
|
||
self.evalute_trainz = SingleEvaluator.build( | ||
aliases=dict(truth='input_test'), | ||
connections=dict( | ||
input=self.estimate_trainz.io.output, | ||
), | ||
point_estimates=['mode'], | ||
truth_point_estimates=["redshift"], | ||
metrics=["all"], | ||
metric_config=dict(brier=dict(limits=[0., 3.5])), | ||
exclude_metrics=['rmse', 'ks', 'kld', 'cvm', 'ad', 'rbpe', 'outlier'], | ||
hdf5_groupname='', | ||
) |
Oops, something went wrong.