feat: clamps results now
Some checks failed
gitea-physics/deepdog/pipeline/head There was a failure building this commit
Some checks failed
gitea-physics/deepdog/pipeline/head There was a failure building this commit
This commit is contained in:
@@ -20,6 +20,8 @@ CHUNKSIZE = 50
|
|||||||
DotInput = Tuple[numpy.typing.ArrayLike, float]
|
DotInput = Tuple[numpy.typing.ArrayLike, float]
|
||||||
|
|
||||||
|
|
||||||
|
CLAMPING_FACTOR = 10
|
||||||
|
|
||||||
_logger = logging.getLogger(__name__)
|
_logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
@@ -192,11 +194,12 @@ class BayesRunWithSubspaceSimulation:
|
|||||||
likelihoods: List[float] = []
|
likelihoods: List[float] = []
|
||||||
|
|
||||||
for (name, result) in zip(self.model_names, results):
|
for (name, result) in zip(self.model_names, results):
|
||||||
|
clamped_likelihood = result.over_target_likelihood
|
||||||
if result.over_target_likelihood is None:
|
if result.over_target_likelihood is None:
|
||||||
_logger.error("got a none result, bye")
|
clamped_likelihood = result.probs_list[-1][0] / CLAMPING_FACTOR
|
||||||
return
|
_logger.warning(f"got a none result, clamping to {}")
|
||||||
likelihoods.append(result.over_target_likelihood)
|
likelihoods.append(clamped_likelihood)
|
||||||
row[f"{name}_likelihood"] = result.over_target_likelihood
|
row[f"{name}_likelihood"] = result.clamped
|
||||||
|
|
||||||
success_weight = sum(
|
success_weight = sum(
|
||||||
[
|
[
|
||||||
|
Reference in New Issue
Block a user