Example GPR Notebook - #11
Open
vtommasini wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds a new GPR diagnostics module and accompanying examples/tests to support leave-one-out evaluation and residual plotting of the GPR-based orbital-parameter correction model.
Changes:
- Introduces
SimulationSupport.gpr.diagnosticswith LOO prediction, LOO cross-validation, and residual plotting utilities. - Adds a
unittestsuite covering the new diagnostics functions. - Adds an example notebook + plotting style + SLURM submission script for running the GPR workflow.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 14 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_diagnostics.py | Adds unit tests validating outputs/shapes and basic behavior of LOO + residual utilities. |
| src/SimulationSupport/gpr/diagnostics.py | Implements LOO prediction/cross-validation and residual plotting helpers for GPR. |
| src/SimulationSupport/gpr/init.py | Re-exports diagnostics symbols at package import time. |
| src/SimulationSupport/EccentricityControl/Examples/run_gpr.sh | Adds a SLURM submission script to run the example notebook via papermill. |
| src/SimulationSupport/EccentricityControl/Examples/plots.mplstyle | Adds a Matplotlib style file used by the example notebook. |
| src/SimulationSupport/EccentricityControl/Examples/GPRExampleNotebook_readme.txt | Documents how to run the example notebook locally/HPC. |
| src/SimulationSupport/EccentricityControl/Examples/GPRExampleNotebook.ipynb | Adds an end-to-end notebook demonstrating data prep, training, and diagnostics. |
Comments suppressed due to low confidence (1)
src/SimulationSupport/EccentricityControl/Examples/run_gpr.sh:1
- The script hard-codes user-specific absolute paths, making it non-portable and brittle across environments/users. Prefer parameterizing paths (env vars / script args), using relative paths where possible, and consider adding
set -euo pipefailto fail fast on errors.
#!/bin/bash
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
vtommasini
force-pushed
the
example-notebook
branch
from
June 8, 2026 00:37
4aa242a to
cdb67eb
Compare
nilsvu
requested changes
Jun 8, 2026
nilsvu
requested changes
Jun 10, 2026
nilsvu
left a comment
Member
There was a problem hiding this comment.
Commenting in a list here because notebooks don't work very well in GitHub.
- Please clean up your imports, you only need very few of those. Dependencies that you definitely need have to be added to pyproject.toml, and it's important to be conservative with those.
- Please add pandas, sxs as a dependencies to pyproject.toml
- Many of the chosen simulations are deprecated. Can you select a more recent dataset?
- You don't need to compute chi_p I think
- Why do you keep NaN eccentricity simulations? I hope a more recent dataset doesn't have NaNs at all, so don't filter for that.
- Define
featuresearlier and use it in the GPR training cell. - Do you need all those
astype(float)commands? Remove if not needed. - Can you simplify the saving to disk cell so you don't have to compute things before saving to disk? Would be good to just take the output of the GPR training and save to disk, without an extra compute step in between.
nilsvu
requested changes
Jun 18, 2026
nilsvu
left a comment
Member
There was a problem hiding this comment.
You can squash your commits into one
vtommasini
force-pushed
the
example-notebook
branch
4 times, most recently
from
June 24, 2026 17:10
f2a7d40 to
d7ef55c
Compare
GPR tutorial fixed typos
vtommasini
force-pushed
the
example-notebook
branch
from
July 28, 2026 09:13
72c371a to
d1087d4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Example GPR notebook to run either on local machine or on HPC. Uses small dataset to demonstrate how to train the GPR and run the cross validation, in order to learn the optimal orbital parameters for non-eccentric BBH simulations.