Simplify to_samples: replace OnlyAccsVarInfo block with rand(model)#1315
Closed
anurag-mds wants to merge 1 commit intoTuringLang:breakingfrom
Closed
Simplify to_samples: replace OnlyAccsVarInfo block with rand(model)#1315anurag-mds wants to merge 1 commit intoTuringLang:breakingfrom
anurag-mds wants to merge 1 commit intoTuringLang:breakingfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## breaking #1315 +/- ##
============================================
- Coverage 78.70% 78.69% -0.02%
============================================
Files 49 49
Lines 3484 3482 -2
============================================
- Hits 2742 2740 -2
Misses 742 742 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Member
|
As it turns out, looking at this more closely, the comment directly above the changed code was correct, and we can't use rand(model) because that doesn't include the results of := statements. So my issue was wrong as well. Sorry! |
Author
|
Thanks for looking into it more closely, Penny! Good to know the distinction -- I learned something about := variables from this. |
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.
Closes #1312
Replaces the manual OnlyAccsVarInfo initialization block in
to_sampleswith a singlerand(model)call, which does the same thing, which samples from the model prior to obtain a templateVarNamedTuplethe same result in one line.