Open
Conversation
Collaborator
|
@claude The suggested changes are good -- please add them. |
|
Claude finished @casperlchristensen's task in 1m 17s —— View job Applied Review Suggestions
All 4 review suggestions have been applied in commit |
- Merge three separate import blocks from simplexity.generative_processes.generator into one - Use TorchDataBatch(...) constructor instead of plain dict literals in both generate functions - Update outdated Returns docstring in generate_data_batch_with_full_history to list all 5 fields - Fix stale belief_states references in generative_process.py docstring to use all_states Co-authored-by: Casper Lützhøft Christensen <casperlchristensen@users.noreply.github.com>
casperlchristensen
approved these changes
Mar 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
see docs/plans/refactor-gen-process-returns.md
Note
Medium Risk
This is a breaking API change:
generate()and the generator helpers no longer return tuples, so any external call sites must migrate to dict key access. Moderate risk of subtle shape/empty-sentinel regressions in downstream code that assumed previous tuple semantics.Overview
Refactors generative-process generation APIs to return structured
TypedDictpayloads instead of tuples.GenerativeProcess.generate()(andIndependentFactoredGenerativeProcess.generate()) now returnsGenerateResultwithstates,observations, andall_states; whenreturn_all_states=False,all_statesbecomes a pytree-preserving empty sentinel.Unifies
generate_data_batch()andgenerate_data_batch_with_full_history()to both return a singleDataBatchwith always-presentgen_states,inputs,labels,belief_states, andprefix_probabilities(empty(batch, 0)fields when history isn’t requested), and mirrors this in the torch wrapper viaTorchDataBatchwhile converting only token tensors to torch. Updates end-to-end training and test suites to use dict access and adds assertions covering empty sentinel shapes and thatstatesreflects the final scan carry.Written by Cursor Bugbot for commit b6a67e8. This will update automatically on new commits. Configure here.