Skip to content

Commit

Permalink
Update blueice dependence (#236)
Browse files Browse the repository at this point in the history
* Update blueice dependence

* fix source wise for indexmorpher
  • Loading branch information
hammannr authored Dec 11, 2024
1 parent 5b2b684 commit abd4a08
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ likelihood_config:
- name: science_run
default_source_class: alea.template_source.TemplateSource
likelihood_type: blueice.likelihood.UnbinnedLogLikelihood
source_wise_interpolation: false
likelihood_config: {"morpher": "IndexMorpher"}
analysis_space:
- cs1: np.arange(0, 102, 2)
Expand Down
8 changes: 7 additions & 1 deletion alea/models/blueice_extended_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,9 +296,16 @@ def _process_blueice_config(self, config, template_folder_list):
# get blueice likelihood_config if it's given
likelihood_config = config.get("likelihood_config", None)

source_wise_interpolation = config.get("source_wise_interpolation", True)

if source_wise_interpolation and likelihood_config:
if likelihood_config.get("morpher") == "IndexMorpher":
raise ValueError("Source-wise interpolation is not yet supported for IndexMorpher.")

blueice_config = {
"pdf_base_config": pdf_base_config,
"likelihood_config": likelihood_config,
"source_wise_interpolation": source_wise_interpolation,
}
return blueice_config

Expand Down Expand Up @@ -335,7 +342,6 @@ def _build_ll_from_config(
# Iterate through each likelihood term in the configuration
for config in likelihood_config["likelihood_terms"]:
blueice_config = self._process_blueice_config(config, template_folder_list)
blueice_config.setdefault("source_wise_interpolation", True)

likelihood_class = cast(Callable, locate(config["likelihood_type"]))
if likelihood_class is None:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ alea_submission = "alea.scripts.alea_submission:main"
[tool.poetry.dependencies]
python = ">=3.8,<3.13"
atomicwrites = "*"
blueice = "*"
blueice = ">=1.2.1"
h5py = "*"
inference-interface = "*"
iminuit = ">=2.21.0"
Expand Down

0 comments on commit abd4a08

Please sign in to comment.