Skip to content

Validate shared log weight normalization - #232

Open
fujikix1102 wants to merge 2 commits into
cosmosis-developers:mainfrom
fujikix1102:audit/log-weight-contracts
Open

fujikix1102 wants to merge 2 commits into
cosmosis-developers:mainfrom
fujikix1102:audit/log-weight-contracts

Conversation

@fujikix1102

Copy link
Copy Markdown

Summary

  • centralize max-scaled log-weight conversion with explicit finite and positive-sum checks
  • use the contract in sampler chain starts, hints, GetDist export, and postprocessing weights
  • preserve zero-weight samples while rejecting NaN, positive infinity, empty, and all-zero inputs

Validation

  • PYTHONPATH=$PWD pytest -q cosmosis/test/test_utils.py cosmosis/test/test_samplers.py -k 'normalized_log_weights or maxlike' --disable-warnings --maxfail=1
  • 19 passed, 33 deselected
  • PYTHONPATH=$PWD pytest -q cosmosis/test/test_getdist.py --disable-warnings --maxfail=1
  • 3 passed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant