lnccbrown / lnccbrown/ssm-simulators
RLSSM: audit and simplify ssms ↔ HSSM config handshake
- Dominant language
- Jupyter Notebook
- Stars
- 24
- Forks
- 18
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 9
Description
## Context
From @AlexanderFengler review on PR #278 (`ssms/rl/config.py:543`):
> We probably need to make it an action item to do one round of cleanup on config handshakes. Doubt that we have simplified this as much as we can in terms of duplication risk.
>
> But also have to take a look, from memory not 100% sure about how all the handshakes actually work currently.
## Handshake surfaces
| Surface | ssms | HSSM |
|---------|------|------|
| Decision-process structural config | `_ssm_config` / `ModelConfigBuilder` | `Config.from_defaults(decision_process)` |
| Computed vs fixed SSM params | `_resolve_handshake()`, `computed_param_mapping` | via `assembled.computed_params` |
| Simulator `theta` | `required_params` | N/A |
| HSSM sampling contract | `list_params`, `bounds`, `params_default` | copied from assembled snapshot |
| Response/choice mapping | `choices`, `response_to_choice` | `_ssms_response_to_choice` |
| Context columns | `context_fields` | `extra_fields` in `from_rlssm_dict` |
| Participant trial layout | `participant_contract` | `_make_ssms_computed_functions` inputs |
| Structural export | `to_hssm_config_dict()` | `from_rlssm_dict()` |
| Executable replay | `AssembledModel.assemble_participant_fn()` | `@annotate_function` wrappers |
Full handoff checklist: `_local/hssm-rlssm-api/ssms-bridge-handoff.md`.
## Questions
- Can `to_hssm_config_dict()` and `from_ssms_model()` converge to one canonical bridge entry?
- Can `participant_contract` be the single source of truth for trial layout?
- Can assembled metadata drop duplication already on `ModelConfig`?
- Rename HSSM `extra_fields` ↔ ssms `context_fields`?
- Minor vs major API changes acceptable on either side?
Deferred from PR #278; separate PR(s).
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with _local/hssm-rlssm-api/ssms-bridge-handoff.md, then trace ssms/rl/config.py:543 and the listed bridge methods, including to_hssm_config_dict(), from_ssms_model(), and _resolve_handshake(). Map each handshake surface and decide which canonical entry points and contracts should remain; done means the duplication and API-change questions have an agreed design and separate implementation scope.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend-api-design
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100