-
Notifications
You must be signed in to change notification settings - Fork 313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add storage for encoding/decoding should_skip #2905
Open
mgarrard
wants to merge
7
commits into
facebook:main
Choose a base branch
from
mgarrard:export-D64519394
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
Summary: There are some cases where the input constructor returns n=o, specifically for repeat arms, this is currently causing an issue in generaiton strategy gen method because if we don't generate from a node we can't meet the TC, and move forward, however, we don't actually want to generate from that node. This simply exposes a prop on gen node to expose this, and default it to false Following diffs will: - update TC.is_met() to accept a GenNode instead of just the name - update input constructor to properly set should skip - update the gs to appropiately handle resetting to false after a gen is completed Reviewed By: lena-kashtelyan Differential Revision: D64444258
…ebook#2893) Summary: **Context:** There are some cases where the input constructor returns n=o, specifically for repeat arms, this is currently causing an issue in generation strategy gen method because if we don't generate from a node we can't meet the TC, and move forward, however, we don't actually want to generate from that node. **This diff** updates tc.is_met() to accept a full generation node which allows us to access the should_skip property we added in the previous diff Following diffs will: - update input constructor to properly set should skip - update the gs to appropiately handle resetting to false after a gen is completed Reviewed By: lena-kashtelyan Differential Revision: D64445871
Summary: **Context:** There are some cases where the input constructor returns n=o, specifically for repeat arms, this is currently causing an issue in generation strategy gen method because if we don't generate from a node we can't meet the TC, and move forward, however, we don't actually want to generate from that node. **This diff** adds the setting of should skip to repeat_arm_n input constructor as it's currently the only input constructor that could enter a condition that creates a skippable node Following diffs will: - update the gs to appropiately handle resetting to false after a gen is completed Reviewed By: lena-kashtelyan Differential Revision: D64475782
…number of arms is 0 (facebook#2895) Summary: **Context:** There are some cases where the input constructor returns n=o, specifically for repeat arms, this is currently causing an issue in generation strategy gen method because if we don't generate from a node we can't meet the TC, and move forward, however, we don't actually want to generate from that node. This diff updates a few things: 1. updates gs.gen_with_multiple_nodes to be able to handle cases where the input constructor specifies 0 arms requested from a node, and then transition away from this skipped node 2. unsets a node's skipped property upon retraversing it -- we do this upon a retraverse instead of at the end of a gen to allow us to inspect a gs at any time and know the most recent occurances of a node. I could see knowing if a node was skipped or not to be pretty important to debugging down the line, so decided it was worth the slighly uglier looking if statement to only reset upon a retraverse 3. updates nodes to not be marked as compeleted if they have an autoaftergen tc. This is safe for now as it's only used by online gs which should never complete, we should revisit how we want to handle node completion and gs completion moving forward as a follow up Followup diffs will: - factor out tc.is_met() code that's repeated a few places in gennode - improve signature on tc.is_met now that we are passing in the node - handle case where arms_per_node passes in 0 arms for a node Reviewed By: lena-kashtelyan Differential Revision: D64484544
…k#2902) Summary: In a previous diff in this stack (52) we added an argument to pass the current node into tc.is_met(). This is actually great news because now we don't need a lot of these other optional parameters! This diff cleans up those optional parameters, and replaces their usage by directly pulling it from the node object. We also fix all calls to tc.is_met() to use the new signature Differential Revision: D64491588
…acebook#2903) Summary: in the previous diff we clean up the signature on the is_met() method, during that i also noticed that the trials_from_node property must have been updated sometime in the last couple months (probably by me) to return an empty dict instead of none if there aren't any trials from node. This means we can make this not an optional field on the tc Differential Revision: D64496943
Summary: This is the fiinal p0 follow up to the stack from 52-57, and in this diff we add storage for this field :) Differential Revision: D64519394
facebook-github-bot
added
the
CLA Signed
Do not delete this pull request or issue due to inactivity.
label
Oct 17, 2024
This pull request was exported from Phabricator. Differential Revision: D64519394 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2905 +/- ##
=======================================
Coverage 95.78% 95.78%
=======================================
Files 504 504
Lines 49790 49817 +27
=======================================
+ Hits 47692 47718 +26
- Misses 2098 2099 +1 ☔ View full report in Codecov by Sentry. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
Summary: This is the fiinal p0 follow up to the stack from 52-57, and in this diff we add storage for this field :)
Differential Revision: D64519394