Skip to content

chore: remove experimental data reader - #353

Open
leahaeusel wants to merge 3 commits into
queens-py:mainfrom
leahaeusel:remove-experimental-data-reader
Open

leahaeusel wants to merge 3 commits into
queens-py:mainfrom
leahaeusel:remove-experimental-data-reader

Conversation

@leahaeusel

Copy link
Copy Markdown
Member

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_obs to observations because descriptive names are always better than mathematical variable names.

I have also deleted the attributes y_obs_vec in the BMFIA iterator and coord_labels in 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

Note: More information on the merge request procedure in QUEENS can be found in the Submit a pull request section in the CONTRIBUTING.md file.

@leahaeusel
leahaeusel requested review from rjoussen and a balanced review from Copilot October 6, 2026 07:18

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

BMFIA currently mishandles multidimensional observation inputs and lacks consistent coordinate validation.

Review effort: Balanced
Findings: 1 High severity · 1 Medium severity · 1 Low severity

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_obs with observations across 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.

Comment thread src/queens/models/likelihoods/bmf_gaussian.py Outdated
Comment thread src/queens/models/likelihoods/bmf_gaussian.py
Comment thread src/queens/models/likelihoods/bmf_gaussian.py Outdated
@leahaeusel leahaeusel added the topic: other Issue/PR that do not fit the topic: <type> labels label Oct 8, 2026
rjoussen
rjoussen previously approved these changes Oct 12, 2026

@rjoussen rjoussen 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.

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.

@leahaeusel

Copy link
Copy Markdown
Member Author

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).

Good idea! I've extended the docstrings to include this information 👍

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic: other Issue/PR that do not fit the topic: <type> labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants