Skip to content

Create a Forward map wrapper to more easily test pipelines without using an emulator#402

Merged
odunbar merged 17 commits into
mainfrom
orad/no-emulator
Mar 6, 2026
Merged

Create a Forward map wrapper to more easily test pipelines without using an emulator#402
odunbar merged 17 commits into
mainfrom
orad/no-emulator

Conversation

@odunbar

@odunbar odunbar commented Feb 18, 2026

Copy link
Copy Markdown
Member

Co-authored by @ArneBouillon

Purpose

Closes #401
See updated docs here

Content

  • Created ForwardMapWrapper with constructor
no_emulator = forward_map_wrapper(
   G, # a function
    prior,
    input_output_pairs;
    encoder_schedule = encoder_schedule,
    encoder_kwargs = encoder_kwargs,
)
  • Created the get_ and predict methods
  • Validated this produces results in the sinusoid example
  • Unit tests

MISC

  • Move machine learning tools into subdirectory
  • Bugfix a ; error for mlt_kwargs in predict(emulator,...)

Results from Sinusoid/

The key here is that "FM" is using the true forward map exactly replacing the emulator
sinusoid_GP_emulator_contours sinusoid_RF_emulator_contours sinusoid_FM_emulator_contours

sinusoid_GP_emulator_std_contours sinusoid_RF_emulator_std_contours sinusoid_FM_emulator_std_contours

sinusoid_MCMC_hist_GP sinusoid_MCMC_hist_RF sinusoid_MCMC_hist_FM


  • I have read and checked the items on the review checklist.

Comment thread src/Emulator.jl
@odunbar

odunbar commented Feb 21, 2026

Copy link
Copy Markdown
Member Author

Test fail from unrelated issue, waiting on merge of #403

Comment thread docs/src/examples/sinusoid_example.md Outdated
Comment thread src/Emulator.jl Outdated
Comment thread src/Emulator.jl
@ArneBouillon

Copy link
Copy Markdown
Collaborator

After our meeting: I think this is useful as-is, but maybe we should add a warning if someone tries to pass in an input space encoder schedule, since they are currently unused.

@odunbar

odunbar commented Feb 25, 2026

Copy link
Copy Markdown
Member Author

I've added a warning on creation of the FMW

┌ Warning: Please note that only the output encoder is used in this implementation. 
│ The input encoder will be initialized if provided, but not used during sampling, which is completed in the full parameter space.
└ @ CalibrateEmulateSample.Emulators 

@odunbar
odunbar force-pushed the orad/no-emulator branch from c0de3d2 to 2fe016d Compare March 3, 2026 01:11
@codecov

codecov Bot commented Mar 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.77419% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.25%. Comparing base (c011a05) to head (b79be2c).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/Emulator.jl 96.42% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #402      +/-   ##
==========================================
+ Coverage   94.20%   94.25%   +0.04%     
==========================================
  Files          10       10              
  Lines        1813     1862      +49     
==========================================
+ Hits         1708     1755      +47     
- Misses        105      107       +2     

☔ View full report in Codecov by Sentry.
📢 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.

@odunbar odunbar changed the title [WIP] Create a Forward map wrapper to more easily test pipelines without using an emulator Create a Forward map wrapper to more easily test pipelines without using an emulator Mar 6, 2026
@odunbar
odunbar merged commit 6448e4c into main Mar 6, 2026
13 of 15 checks 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.

Add tool to use the forward map instead of an emulator for testing purposes

2 participants