Skip to content

Fix specialty mismatch#148

Merged
zmek merged 3 commits intomainfrom
fix-specialty-mismatch
Mar 5, 2026
Merged

Fix specialty mismatch#148
zmek merged 3 commits intomainfrom
fix-specialty-mismatch

Conversation

@zmek
Copy link
Copy Markdown
Collaborator

@zmek zmek commented Mar 5, 2026

Summary

  • Separate services and subgroups into distinct keys ("services" / "subgroups") in the transfer model's internal dict, so subgroup names (e.g. paediatric, adult_male_young) no longer appear alongside real services in error messages
  • Return 0.0 with a warning when get_transfer_prob is called with a service not in the training set, instead of crashing with a ValueError that dumps hundreds of service names
  • Shorten warn_specialty_mismatch messages to report counts only, without listing every mismatched specialty
  • Add prettier formatting step to tox -e docs (pinned to @3.1.0) so generated notebook markdown matches the pre-commit hook and doesn't create spurious diffs
  • Fix task issue template formatting

Test plan

  • Existing tests pass (221 tests, all green)
  • New test: unknown service returns 0.0 with warning
  • New test: internal dict correctly separates services from subgroups
  • uv run tox -e docs followed by pre-commit produces no changes

zmek added 3 commits March 5, 2026 09:32
- Separate services and subgroups into distinct keys in the transfer
 model's internal dict to prevent subgroup names leaking into error
 messages.
- Return 0.0 with a warning for unknown services instead of
- raising.
- Shorten warn_specialty_mismatch to report counts only.
@zmek zmek merged commit d80b7e1 into main Mar 5, 2026
6 checks passed
@zmek
Copy link
Copy Markdown
Collaborator Author

zmek commented Mar 5, 2026

Closes #147

@zmek zmek deleted the fix-specialty-mismatch branch March 5, 2026 12:02
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.

1 participant