Repository navigation
chore: remove experimental data reader - #353
leahaeusel wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
BMFIA currently mishandles multidimensional observation inputs and lacks consistent coordinate validation.
Review effort: Balanced
Findings: 1
Open (3)
What changed in this PR
Removes the experimental data reader following the linked developer discussion and makes callers provide observations directly.
Changes:
- Replaces
y_obswithobservationsacross likelihood APIs. - Adds optional BMFIA observation coordinates and times.
- Updates tests to use in-memory observation fixtures instead of CSV files.
| File | Description |
|---|---|
src/queens/utils/experimental_data_reader.py |
Removes the experimental reader. |
src/queens/models/likelihoods/_likelihood.py |
Renames stored observations. |
src/queens/models/likelihoods/gaussian.py |
Requires observations directly. |
src/queens/models/likelihoods/bmf_gaussian.py |
Adds direct BMFIA observation inputs. |
src/queens/iterators/bmfia.py |
Handles missing coordinate/time features. |
src/queens/iterators/adaptive_sampling.py |
Uses the renamed observation attribute. |
tests/unit_tests/conftest.py |
Removes obsolete BMFIA fixture data. |
tests/unit_tests/models/test_gaussian.py |
Updates Gaussian tests. |
tests/unit_tests/models/test_bayesian_mf_gaussian.py |
Tests the new BMFIA API. |
tests/unit_tests/iterators/test_bmfia.py |
Tests missing feature inputs. |
tests/unit_tests/iterators/test_adaptive_sampling.py |
Updates observation mocks. |
tests/unit_tests/interfaces/test_bmfia_interface.py |
Updates interface signatures. |
tests/integration_tests/iterators/conftest.py |
Provides in-memory observation fixtures. |
tests/integration_tests/models/test_logpdf_gaussian_process.py |
Updates Gaussian construction. |
tests/integration_tests/iterators/test_sequential_monte_carlo.py |
Removes CSV-reader setup. |
tests/integration_tests/iterators/test_sequential_monte_carlo_chopin.py |
Uses observations directly. |
tests/integration_tests/iterators/test_rpvi.py |
Removes reader-based RPVI setup. |
tests/integration_tests/iterators/test_nuts.py |
Uses shared observation fixtures. |
tests/integration_tests/iterators/test_metropolis_hastings.py |
Replaces CSV fixtures. |
tests/integration_tests/iterators/test_metropolis_hastings_pymc.py |
Uses direct observations. |
tests/integration_tests/iterators/test_hamiltonian_monte_carlo.py |
Uses direct observations. |
tests/integration_tests/iterators/test_bmfia.py |
Passes BMFIA observation dictionaries. |
tests/integration_tests/iterators/test_bbvi.py |
Uses direct observations. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
rjoussen
left a comment
There was a problem hiding this comment.
Looks good! The only thing I would still do maybe is to mention the necessary dimensions the observation array needs to have (in most cases that's just the same dimensions like the forward model result I assume). But not urgently necessary, since it wasnt documented before either.
048bbc7 to
95ecb4f
Compare
Good idea! I've extended the docstrings to include this information 👍 |



Description and Context:
What and Why?
As discussed in #334 and queens-py/queens-meetings#45, this PR removes the experimental data reader. From now on, users will need to handle reading in observational data by themselves and are free to do so using one of the QUEENS data processors or otherwise.
The PR also renames all occurrences of
y_obstoobservationsbecause descriptive names are always better than mathematical variable names.I have also deleted the attributes
y_obs_vecin the BMFIA iterator andcoord_labelsin the BmfiaInterface because they were never used anyway.Please note that the entire BMFIA module will need a thorough makeover in the future, and this PR can be considered the first step.
Related Issues and Pull Requests
Disclosure of AI assistance
The changes were planned and executed with Claude Opus 5.5 and reviewed thereafter.
Interested Parties
@rjoussen