Skip to content

Commit

Permalink
update sl test modules
Browse files Browse the repository at this point in the history
  • Loading branch information
mafrahm committed Aug 12, 2024
1 parent d7997c9 commit 696e50e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
3 changes: 2 additions & 1 deletion hbw/config/categories.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,8 @@ def add_categories_ml(config, ml_model_inst):

# NOTE: building this many categories takes forever: has to be improved...
category_blocks = OrderedDict({
"mll": [config.get_category("sr"), config.get_category("dy_cr")],
# "mll": [config.get_category("sr"), config.get_category("dy_cr")],
"mll": [config.get_category("sr")],
# "lepid": [config.get_category("sr"), config.get_category("fake")],
# "met": [config.get_category("highmet"), config.get_category("lowmet")],
"lep": [config.get_category(lep_ch) for lep_ch in config.x.lepton_channels],
Expand Down
15 changes: 10 additions & 5 deletions hbw/inference/sl.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,20 +145,25 @@

# minimal model for quick test purposes
cls_dict_test = {
"ml_model_name": "dense_test",
"ml_model_name": "dense_22post_test",
"processes": [
"hh_ggf_hbb_hvvqqlnu_kl1_kt1",
"st_tchannel",
"tt",
],
"config_categories": [
"1e__ml_hh_ggf_hbb_hvvqqlnu_kl1_kt1",
"1e__ml_st",
"sr__1e__ml_hh_ggf_hbb_hvvqqlnu_kl1_kt1",
"sr__1e__ml_tt",
],
"systematics": [
"lumi_13TeV_2016",
"lumi_13TeV_2017",
"lumi_13TeV_1718",
"lumi_13TeV_2022",
"lumi_13TeV_2023",
"lumi_13TeV_correlated",
],
}
test = default.derive("test", cls_dict=cls_dict_test)
sl_22post_test = default.derive("sl_22post_test", cls_dict=cls_dict_test)

# model but with different fit variable
jet1_pt = default.derive("jet1_pt", cls_dict={
Expand Down
4 changes: 3 additions & 1 deletion hbw/ml/derived/sl.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,9 @@ def setup(self):
"processes": ["hh_ggf_hbb_hvvqqlnu_kl1_kt1", "tt", "st", "v_lep"],
})
dense_22post_test = dense_22post.derive("dense_22post_test", cls_dict={
"processes": ["hh_ggf_hbb_hvvqqlnu_kl1_kt1", "st_tchannel_t"],
"training_configs": lambda self, requested_configs: ["l22post"],
"processes": ["hh_ggf_hbb_hvvqqlnu_kl1_kt1", "tt"],
"epochs": 10,
})
dense_22 = DenseClassifierSL.derive("dense_22", cls_dict={
"training_configs": lambda self, requested_configs: ["c22post", "c22pre"],
Expand Down

0 comments on commit 696e50e

Please sign in to comment.