Draft
Conversation
saleml
approved these changes
Oct 15, 2025
Collaborator
saleml
left a comment
There was a problem hiding this comment.
Solid PR - adds much-needed documentation and comprehensive tests for the local search sampler. Code is production-ready.
- Excellent inline comments explaining the algorithm flow
- Smart reference implementation for regression testing
- Good edge case coverage
Can you please check if Back-step clamping should be terminating_idx - 1 ?
| assert (back_ratio is not None) and (0 < back_ratio <= 1) | ||
| K = torch.ceil(back_ratio * (trajectories.terminating_idx - 1)).long() | ||
| else: | ||
| K = torch.where( |
Collaborator
There was a problem hiding this comment.
Should this be trajectories.terminating_idx - 1 to ensure n_prevs >= 0
josephdviviano
commented
Oct 23, 2025
|
|
||
| # Adjust layout and save to home directory. | ||
| if args.plot: | ||
| import seaborn as sns |
Collaborator
Author
There was a problem hiding this comment.
this is to fix an annoying auxiliary issue.
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.
Description
WIP - trying to refactor the
LocalSearchSamplerlogic to take better advantage of thePolicyMixinframework.For now, consists only of comments and tests (the tests will be useful to ensure any refactoring does not break the method).
Some notes on the plan:
design ideas to simplify LocalSearchSampler using PolicyMixin