Context
While reviewing the Protpardelle wrapper's featurize() method (see PR #300, review comment #300 (comment)), we noticed that GenerativeModelInput.x_init is populated by every model wrapper's featurize() method (src/sampleworks/models/boltz/wrapper.py, src/sampleworks/models/protenix/wrapper.py, src/sampleworks/models/rf3/wrapper.py, src/sampleworks/models/protpardelle/wrapper.py), but a codebase-wide search (rg '\.x_init\b') found no downstream reads of this attribute anywhere outside of the constructors themselves.
Sampling appears to actually initialize state via initialize_from_prior() (e.g. sampleworks.core.samplers.pure_guidance.PureGuidance.sample), not via the x_init field on GenerativeModelInput.
Several existing TODO comments already flag this suspicion, e.g.:
src/sampleworks/models/rf3/wrapper.py line 484: "TODO: figure out if this is necessary or if we should just remove x_init completely."
src/sampleworks/models/boltz/wrapper.py line 735: "not sure exactly what the best way to handle x_init is, should define it a bit better"
src/sampleworks/models/protpardelle/wrapper.py line 441: "I don't think we really need it. Our sampler will call the initialize_from_prior() method..."
Requested work
- Confirm that
GenerativeModelInput.x_init is truly unused by any sampler/scaler downstream consumer (beyond being set at construction time).
- If confirmed unused:
- Remove the
x_init field from GenerativeModelInput in src/sampleworks/models/protocol.py.
- Remove the corresponding
x_init=... computation/plumbing from each wrapper's featurize():
src/sampleworks/models/boltz/wrapper.py
src/sampleworks/models/protenix/wrapper.py
src/sampleworks/models/rf3/wrapper.py
src/sampleworks/models/protpardelle/wrapper.py
- Update any related docstrings/comments referencing
x_init.
- Update tests that construct
GenerativeModelInput with x_init=....
Acceptance criteria
GenerativeModelInput no longer carries an x_init field (or the field is kept only if a genuine downstream use is discovered, in which case this issue should instead document that use).
- All model wrappers'
featurize() methods are updated accordingly, and related dead code (e.g. reference-coordinate computation solely for x_init) is removed.
- Existing tests pass with the updated protocol.
References
Context
While reviewing the Protpardelle wrapper's
featurize()method (see PR #300, review comment #300 (comment)), we noticed thatGenerativeModelInput.x_initis populated by every model wrapper'sfeaturize()method (src/sampleworks/models/boltz/wrapper.py,src/sampleworks/models/protenix/wrapper.py,src/sampleworks/models/rf3/wrapper.py,src/sampleworks/models/protpardelle/wrapper.py), but a codebase-wide search (rg '\.x_init\b') found no downstream reads of this attribute anywhere outside of the constructors themselves.Sampling appears to actually initialize state via
initialize_from_prior()(e.g.sampleworks.core.samplers.pure_guidance.PureGuidance.sample), not via thex_initfield onGenerativeModelInput.Several existing TODO comments already flag this suspicion, e.g.:
src/sampleworks/models/rf3/wrapper.pyline 484: "TODO: figure out if this is necessary or if we should just remove x_init completely."src/sampleworks/models/boltz/wrapper.pyline 735: "not sure exactly what the best way to handle x_init is, should define it a bit better"src/sampleworks/models/protpardelle/wrapper.pyline 441: "I don't think we really need it. Our sampler will call the initialize_from_prior() method..."Requested work
GenerativeModelInput.x_initis truly unused by any sampler/scaler downstream consumer (beyond being set at construction time).x_initfield fromGenerativeModelInputinsrc/sampleworks/models/protocol.py.x_init=...computation/plumbing from each wrapper'sfeaturize():src/sampleworks/models/boltz/wrapper.pysrc/sampleworks/models/protenix/wrapper.pysrc/sampleworks/models/rf3/wrapper.pysrc/sampleworks/models/protpardelle/wrapper.pyx_init.GenerativeModelInputwithx_init=....Acceptance criteria
GenerativeModelInputno longer carries anx_initfield (or the field is kept only if a genuine downstream use is discovered, in which case this issue should instead document that use).featurize()methods are updated accordingly, and related dead code (e.g. reference-coordinate computation solely forx_init) is removed.References