From 7029e63ee1d57472871aeb1900ec8ffab4e315cf Mon Sep 17 00:00:00 2001 From: Robert Hammann <53221264+hammannr@users.noreply.github.com> Date: Wed, 13 Nov 2024 11:50:12 +0100 Subject: [PATCH 1/3] Source-wise interpolation (#228) * get instead of pop * default to source-wise interpolation --- alea/models/blueice_extended_model.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/alea/models/blueice_extended_model.py b/alea/models/blueice_extended_model.py index ff36c03..e6fd5d5 100644 --- a/alea/models/blueice_extended_model.py +++ b/alea/models/blueice_extended_model.py @@ -4,6 +4,7 @@ import itertools from copy import deepcopy +from tqdm import tqdm import numpy as np import scipy.stats as stats from blueice.likelihood import LogAncillaryLikelihood, LogLikelihoodSum @@ -334,6 +335,7 @@ 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: @@ -399,7 +401,7 @@ def _build_data_generators(self) -> list: """ # last one is AncillaryLikelihood data_generators = [] - for ll_term in self.likelihood_list[:-1]: + for ll_term in tqdm(self.likelihood_list[:-1], desc="building data generators"): methods = [s.config["pdf_interpolation_method"] for s in ll_term.base_model.sources] # make sure that all sources have the same pdf_interpolation_method if len(set(methods)) != 1: From adc7a61b33ed76b9d3fd1fbe410849461e4863bb Mon Sep 17 00:00:00 2001 From: Dacheng Xu Date: Tue, 26 Nov 2024 18:26:04 -0500 Subject: [PATCH 2/3] Fix bug, only add tarball when git installed (#233) --- alea/submitters/htcondor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/alea/submitters/htcondor.py b/alea/submitters/htcondor.py index 68fd816..4511faf 100644 --- a/alea/submitters/htcondor.py +++ b/alea/submitters/htcondor.py @@ -407,8 +407,8 @@ def make_tarballs(self): logger.warning( f"Using tarball of user installed package {package_name} at {tarball_path}." ) - tarballs.append(tarball) - tarball_paths.append(tarball_path) + tarballs.append(tarball) + tarball_paths.append(tarball_path) return tarballs, tarball_paths def _initialize_job( From aed79c80755e1c5d441a27ece7593e95aa3fb6be Mon Sep 17 00:00:00 2001 From: Dacheng Xu Date: Tue, 26 Nov 2024 18:33:27 -0500 Subject: [PATCH 3/3] Switch to master for docformatter (#234) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index cfdf5f1..ea78b02 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -19,7 +19,7 @@ repos: language_version: python3.9 - repo: https://github.com/pycqa/docformatter - rev: v1.7.5 + rev: master hooks: - id: docformatter additional_dependencies: [tomli]