Skip to content

ssms.rl presets are not resolvable through model_config / hssm_support — HSSM's RV path warns and degrades #304

Description

@AlexanderFengler

Summary

ssm-simulators 0.13 ships the choice-only RL presets in ssms/rl/preset.py (2AB_RW_InvTempSoftmax, 3AB_RW_InvTempSoftmax, …), resolvable via ssms.rl.resolve_model. But they are not registered in ssms.config.model_config, which is the only registry ssms.hssm_support consults. Downstream (HSSM) the config layer bridges fine, but the RV/simulator path degrades.

Companion to lnccbrown/HSSM#1052 (this issue covers the ssm-simulators half).

State (0.13.1)

preset ssms.rl.resolve_model in model_config
2AB_RW_InvTempSoftmax
2AB_RW_DualAlpha_InvTempSoftmax ❌ KeyError
3AB_RW_InvTempSoftmax
4AB_RW_InvTempSoftmax ❌ KeyError

The decision-process kernels ARE registered, under different names: inv_temp_softmax_2/3/4.

Behavior today

ssms.hssm_support.get_simulator_fun_internal (hssm_support.py:333-346) handles any name missing from model_config by warning and building a fallback simulator anyway:

You supplied a model '2AB_RW_InvTempSoftmax', which is currently not supported in
the ssm_simulators package. An error will be thrown when sampling from the random
variable or when using any posterior or prior predictive sampling methods.

…with choices silently defaulting to [0, 1, 2] (wrong for a 2AB model). The promised error then surfaces much later and far away (in HSSM: at posterior-predictive time, or as an opaque numba serialization crash — see HSSM#1052 for that half).

Proposed fixes

  1. Registry bridging (the feature): make the ssms.rl presets reachable through the hssm_support path — either register them in model_config, or have get_simulator_fun_internal consult ssms.rl.resolve_model before falling back.
  2. Fail loudly (the robustness): when a name is in neither registry, get_simulator_fun_internal should raise at build time instead of warn-and-degrade — the current fallback also fabricates a wrong default choices=[0,1,2].

Impact

Four HSSM smoke tests (tests/rl/test_choice_only_rl.py::TestChoiceOnlyRealSSMSSmoke) are skip-guarded on model_name in model_config pending this wiring. Discovered while bumping HSSM's pin to ssm-simulators 0.13.1 (HSSM#967).

🤖 Generated with Claude Code

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions