Conversation
…ions (#836) * feat: implement HDF5 support for saving inference data and configurations * fix: convert HDF5 dataset attributes to a dictionary * Add report generation functionality with Papermill and Jupyter Notebook template - Introduced `generate_report.py` to handle report generation from input data files. - Integrated Papermill for executing Jupyter Notebook templates and generating HTML reports. - Added a new Jupyter Notebook template `template_report.ipynb` for report formatting. - Updated `pyproject.toml` to include new dependencies: `nbconvert`, `papermill`, and `plotly`. - Registered new command line entry point for report generation in `pyproject.toml`. - Included the notebook template in package data for distribution. * Update src/gwkokab/analysis/report/generate_report.py Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * style: format output notebook path assignment * feat: add corner library dependency for enhanced plotting capabilities Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * fix: ensure compatibility with JAX Array in HDF5 write function Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * feat: using file descriptor to reduce IO overhead --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
… and `SubPopulationModelCore` (#837) * refactor: rename parameters for consistency in `MultiSourceModelCore` and `SubPopulationModelCore` * Update src/gwkokab/analysis/multisource/common.py Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * fix: reorder parameters in `MultiSourceModelCore` --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…#833) Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Code Review
This pull request refactors the inference output system to save results, sampler configurations, constants, and variables index directly into a single HDF5 file (inference_data.hdf5) instead of multiple text and JSON files. It also introduces a new reporting module to generate HTML reports from the HDF5 data, updates parameter naming conventions across models, and adds utilities for computing marginal densities.
Several issues were identified in the review: in h5repack.py, the options argument should be defined after file to prevent it from consuming all positional arguments; in utils.py, an independent if statement is needed instead of elif to ensure JAX arrays are converted to NumPy arrays even when overwriting existing datasets; in template_report.ipynb, reading chains directly from HDF5 is preferred over np.array_split to avoid errors from unequal chain lengths; in generate_report.py, jupyter should be executed via sys.executable for robustness; and in marginals.py, a safe divisor is required in jnp.where to prevent NaN gradients during JAX operations.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Related to
MultiSourceModelCoreandSubPopulationModelCore#837.h5and.hdf5files #838