Skip to content

fix sglrw for dict params and multi dim tensors - #151

Merged
SamDuffield merged 2 commits into
normal-computing:mainfrom
jpweideman:fix-sglrw-tree-params
Aug 28, 2026
Merged

fix sglrw for dict params and multi dim tensors#151
SamDuffield merged 2 commits into
normal-computing:mainfrom
jpweideman:fix-sglrw-tree-params

Conversation

@jpweideman

Copy link
Copy Markdown
Contributor

state.params.dtype fails on OrderedDict. Moved scalar to tensor conversion into ternary_probs using drift_val.dtype/device.
ternary_probs(...)[: , 2] fails for multi dimensional parameters. Changed to [...,2]. Updated tests to cover dict params with multi dim tensors.

@SamDuffield

Copy link
Copy Markdown
Contributor

Looking good! Just make sure to run the formatter (or pre-commit https://normal-computing.github.io/posteriors/contributing/)

@SamDuffield
SamDuffield merged commit bc5eac3 into normal-computing:main Aug 28, 2026
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.

2 participants