Skip to content

Issue 73: Smooth using custom prior configs and a new vignette#77

Merged
SamuelBrand1 merged 8 commits into
mainfrom
73-custom-gpconfig
Jun 4, 2026
Merged

Issue 73: Smooth using custom prior configs and a new vignette#77
SamuelBrand1 merged 8 commits into
mainfrom
73-custom-gpconfig

Conversation

@SamuelBrand1

Copy link
Copy Markdown
Collaborator

This pull request makes it easier to configure Gaussian Process (GP) priors in the make_and_fit_model function, and add a vignette for this.

API Improvements and Configuration Flexibility

  • The make_and_fit_model function now accepts a config keyword argument, allowing users to pass a custom GPConfig for specifying GP prior structure and hyperparameters. All other keyword arguments (such as n_mcmc, n_hmc, hmc_config, etc.) are forwarded directly to AutoGP.fit_smc!, simplifying the interface and making it more flexible.
  • The GPConfig type is now re-exported for convenience, making it easier for users to construct and pass custom configurations.

Documentation and Examples

  • The documentation for make_and_fit_model is expanded with detailed explanations and code examples showing how to customize GP priors using GPConfig, including how to update nested prior entries and leverage the Accessors.jl package for convenient configuration edits.

Expose and forward AutoGP GPConfig through the wrapper: export GPConfig from the package and accept a config keyword in make_and_fit_model, passing it into AutoGP.GPModel. The make_and_fit_model docs and examples were updated to document the config argument and to clarify that most options (including n_mcmc/n_hmc) are forwarded as kwargs to AutoGP.fit_smc! rather than being wrapper defaults. The SMC call now forwards kwargs unmodified (so callers must provide n_mcmc/n_hmc), and schedule calculation keeps the previous guard for small datasets. Documentation (.github/copilot-instructions.md) was updated to reflect the new passthrough semantics. Added tests (test/test_gpconfig.jl) to verify GPConfig forwarding, custom kernel/prior propagation, and that omitting required passthrough kwargs (n_mcmc/n_hmc) surfaces an error.
Rewrite and modernize the setting-priors vignette and its script

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR expands NowcastAutoGP’s model-fitting API to make Gaussian Process prior customization easier by allowing callers to pass an AutoGP GPConfig into make_and_fit_model, and adds a new documentation vignette demonstrating prior editing (including Accessors.jl workflows).

Changes:

  • Add config support in make_and_fit_model and forward it into AutoGP.GPModel, while forwarding remaining kwargs to AutoGP.fit_smc!.
  • Re-export GPConfig from the top-level NowcastAutoGP module and add tests verifying config forwarding.
  • Add a new “setting-priors” vignette and wire it into the docs build and docs environment.

Reviewed changes

Copilot reviewed 9 out of 12 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
test/test_gpconfig.jl Adds tests to validate that config is forwarded into the created GPModel.
src/NowcastAutoGP.jl Re-exports GPConfig for user convenience.
src/make_and_fit_model.jl Updates make_and_fit_model to accept/forward config and to pass through fit_smc! kwargs.
docs/vignettes/setting-priors.jl New Literate vignette showing how to modify priors (incl. Accessors.@set).
docs/src/vignettes/setting-priors.md Generated markdown output for the new vignette.
docs/Project.toml Adds Accessors to the docs environment dependencies.
docs/make.jl Adds the new vignette to the rendered docs pages list.
docs/make_vignettes.jl Updates vignette generation list to include the new vignette.
.github/copilot-instructions.md Updates internal contribution guidance/examples to reflect the new config usage and passthrough kwargs behavior.

Comment thread src/make_and_fit_model.jl Outdated
Comment thread src/make_and_fit_model.jl
Comment thread test/test_gpconfig.jl
Comment thread docs/make_vignettes.jl
Comment thread docs/vignettes/setting-priors.jl Outdated
Comment thread docs/vignettes/setting-priors.jl Outdated
Comment thread docs/vignettes/setting-priors.jl Outdated
Comment thread docs/vignettes/setting-priors.jl Outdated
SamuelBrand1 and others added 2 commits June 4, 2026 11:02
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.68%. Comparing base (dfcb1ee) to head (15a2c59).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #77   +/-   ##
=======================================
  Coverage   95.68%   95.68%           
=======================================
  Files           5        5           
  Lines         139      139           
=======================================
  Hits          133      133           
  Misses          6        6           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@SamuelBrand1 SamuelBrand1 merged commit 11cff55 into main Jun 4, 2026
10 checks passed
@SamuelBrand1 SamuelBrand1 deleted the 73-custom-gpconfig branch June 4, 2026 10:15
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.

Forward a custom GPConfig (prior / node distributions) through make_and_fit_model

3 participants