Skip to content

251 refactor expose public API for PSF model generation - #252

Merged
ChaitanyaChawak merged 9 commits into
developfrom
251-refactor-expose-public-api-for-psf-model-generation
Sep 28, 2026
Merged

ChaitanyaChawak merged 9 commits into
developfrom
251-refactor-expose-public-api-for-psf-model-generation

Conversation

@jeipollack

@jeipollack jeipollack commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This PR introduces a new public API for PSF model generation and refactors the PSFInference data contract by introducing PSFDataset, resulting in breaking API changes.

Closes #251

What’s changed

  • Introduce PSFDataset as the unified input container for PSF inference.
  • Update PSFInference to use PSFDataset for inference data.
  • Add the generate_psf_models() public API for PSF model generation.
  • Remove the deprecated prepare_inference_data method.
  • Enforce the inference dataset schema and require positions and seds.
  • Update inference adapter construction and associated tests/fixtures.
  • Eagerly load inference configuration during initialization.
  • Add validation for inference data types and shapes.

How to test / verify

  • Inspect the tests in the psf_inference_test.py module.
  • Check that CI passes.

Scope

Indicate the type of PR:

  • Feature
  • Bug fix
  • Hotfix
  • Documentation / process change
  • Internal / refactor
  • Release

Optionally, note if this PR is part of a larger milestone or set of related PRs.

Changelog

Did this PR introduce user-visible changes?
If yes, a Scriv changelog fragment must be added and committed.

  • Changelog fragment added (if applicable)

Reviewer Checklist

Reviewers should confirm the following before approving and merging:

  • The PR targets the correct base branch (develop, or main for release PRs)
  • The PR is assigned to the developer
  • Appropriate labels are applied
  • The PR is included in relevant projects and/or milestones
  • Description clearly explains what has changed
  • Issue references included, if applicable
  • Code and documentation adhere to current standards (ruff)
  • Documentation updates included, if relevant
  • CI tests are passing
  • All reviewer comments have been addressed

Next Steps / Notes (if applicable)

@jeipollack jeipollack added this to the Outlier Removal milestone Sep 9, 2026
@jeipollack jeipollack self-assigned this Sep 9, 2026
@jeipollack jeipollack added the enhancement New feature or request label Sep 9, 2026
@jeipollack
jeipollack force-pushed the 251-refactor-expose-public-api-for-psf-model-generation branch 2 times, most recently from 6860593 to c485d3c Compare September 16, 2026 08:50
Comment thread src/wf_psf/inference/psf_inference.py
Jennifer Pollack and others added 7 commits September 28, 2026 13:19
- Introduce PSFDataset as the unified input container for PSF inference.
- Update PSFInference to use PSFDataset for inference data.
- Remove the deprecated prepare_inference_data method.
- Update inference adapter construction and associated tests/fixtures.
- Enforce the inference dataset schema and required positions/SED fields.
- Eagerly load inference configuration during initialization.
- Add validation for inference data types and shapes.
- Add generate_psf_model public API
- Add unit test
- Update out-of-date PSFInference class doc string
…sion

- Define inference-specific optional dataset fields with INFERENCE_OPTIONAL_KEYS in constants.py
- Update the INFERENCE_SCHEMA.optional_keys to use INFERENCE_OPTIONAL_KEYS
- Update and add TensorFlow conversion tests for missing and None fields
- Rename the MISSING sentinel to _MISSING
- Add type hints to ensure_tensor to resolve a Pylance issue
@jeipollack
jeipollack force-pushed the 251-refactor-expose-public-api-for-psf-model-generation branch from 57b626e to de003b0 Compare September 28, 2026 12:46
Comment thread src/wf_psf/tests/test_inference/psf_inference_test.py
@ChaitanyaChawak
ChaitanyaChawak merged commit 310adc2 into develop Sep 28, 2026
2 checks passed
@ChaitanyaChawak
ChaitanyaChawak deleted the 251-refactor-expose-public-api-for-psf-model-generation branch September 28, 2026 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Development

Successfully merging this pull request may close these issues.

2 participants