-
Notifications
You must be signed in to change notification settings - Fork 357
Generalize GenNode.apply_input_constructors
#4704
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
base: main
Are you sure you want to change the base?
Conversation
|
@lena-kashtelyan has exported this pull request. If you are a Meta employee, you can view the originating Diff in D80175141. |
87ce03e to
e19aba2
Compare
Summary: Long-overdue diff to stop applying input constructors in a manual way that defeats their purpose (if each is applied through a helper, what's the point of keeping them in a mapping from the name of the arg they are going to construct, to a callable that constructs it?) This diff: 1. Moves behavior related to injection of "disabled parameters" in the search space, from input constructor (where it's not even guaranteed to apply since that input constructor isn't always used), to generation node (for now; proposed move to adapter is in D89779057 –– let's consider alternatives on that diff, too), with an underlying utility moved to `SearchSpace` to be co-located with the rest of the disabled parameter logic. 2. Reaps `GenerationStrategy.DEFAULT_N`, which was actually unused (or used in one place but always left at its default of 1, only complicating things). D89772029 will deal with this better, with a top-level concurrency setting added via an `ExperimentDesign` object. 3. Applies input constructors generically, in a loop, instead of via helpers per input constructor purpose. This ends up removing a bunch of duplicate logic that lived at different layers within. Differential Revision: D80175141 Privacy Context Container: L1307644
Summary: Long-overdue diff to stop applying input constructors in a manual way that defeats their purpose (if each is applied through a helper, what's the point of keeping them in a mapping from the name of the arg they are going to construct, to a callable that constructs it?) This diff: 1. Moves behavior related to injection of "disabled parameters" in the search space, from input constructor (where it's not even guaranteed to apply since that input constructor isn't always used), to generation node (for now; proposed move to adapter is in D89779057 –– let's consider alternatives on that diff, too), with an underlying utility moved to `SearchSpace` to be co-located with the rest of the disabled parameter logic. 2. Reaps `GenerationStrategy.DEFAULT_N`, which was actually unused (or used in one place but always left at its default of 1, only complicating things). D89772029 will deal with this better, with a top-level concurrency setting added via an `ExperimentDesign` object. 3. Applies input constructors generically, in a loop, instead of via helpers per input constructor purpose. This ends up removing a bunch of duplicate logic that lived at different layers within. Differential Revision: D80175141 Privacy Context Container: L1307644
Summary: Long-overdue diff to stop applying input constructors in a manual way that defeats their purpose (if each is applied through a helper, what's the point of keeping them in a mapping from the name of the arg they are going to construct, to a callable that constructs it?) This diff: 1. Moves behavior related to injection of "disabled parameters" in the search space, from input constructor (where it's not even guaranteed to apply since that input constructor isn't always used), to generation node (for now; proposed move to adapter is in D89779057 –– let's consider alternatives on that diff, too), with an underlying utility moved to `SearchSpace` to be co-located with the rest of the disabled parameter logic. 2. Reaps `GenerationStrategy.DEFAULT_N`, which was actually unused (or used in one place but always left at its default of 1, only complicating things). D89772029 will deal with this better, with a top-level concurrency setting added via an `ExperimentDesign` object. 3. Applies input constructors generically, in a loop, instead of via helpers per input constructor purpose. This ends up removing a bunch of duplicate logic that lived at different layers within. Differential Revision: D80175141 Privacy Context Container: L1307644
85b2933 to
c57ac71
Compare
Summary: Long-overdue diff to stop applying input constructors in a manual way that defeats their purpose (if each is applied through a helper, what's the point of keeping them in a mapping from the name of the arg they are going to construct, to a callable that constructs it?) This diff: 1. Moves behavior related to injection of "disabled parameters" in the search space, from input constructor (where it's not even guaranteed to apply since that input constructor isn't always used), to generation node (for now; proposed move to adapter is in D89779057 –– let's consider alternatives on that diff, too), with an underlying utility moved to `SearchSpace` to be co-located with the rest of the disabled parameter logic. 2. Reaps `GenerationStrategy.DEFAULT_N`, which was actually unused (or used in one place but always left at its default of 1, only complicating things). D89772029 will deal with this better, with a top-level concurrency setting added via an `ExperimentDesign` object. 3. Applies input constructors generically, in a loop, instead of via helpers per input constructor purpose. This ends up removing a bunch of duplicate logic that lived at different layers within. Differential Revision: D80175141 Privacy Context Container: L1307644
Summary: Long-overdue diff to stop applying input constructors in a manual way that defeats their purpose (if each is applied through a helper, what's the point of keeping them in a mapping from the name of the arg they are going to construct, to a callable that constructs it?) This diff: 1. Moves behavior related to injection of "disabled parameters" in the search space, from input constructor (where it's not even guaranteed to apply since that input constructor isn't always used), to generation node (for now; proposed move to adapter is in D89779057 –– let's consider alternatives on that diff, too), with an underlying utility moved to `SearchSpace` to be co-located with the rest of the disabled parameter logic. 2. Reaps `GenerationStrategy.DEFAULT_N`, which was actually unused (or used in one place but always left at its default of 1, only complicating things). D89772029 will deal with this better, with a top-level concurrency setting added via an `ExperimentDesign` object. 3. Applies input constructors generically, in a loop, instead of via helpers per input constructor purpose. This ends up removing a bunch of duplicate logic that lived at different layers within. Differential Revision: D80175141 Privacy Context Container: L1307644
c57ac71 to
04794e0
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4704 +/- ##
==========================================
- Coverage 96.71% 96.71% -0.01%
==========================================
Files 582 582
Lines 60713 60735 +22
==========================================
+ Hits 58717 58738 +21
- Misses 1996 1997 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Summary: Long-overdue diff to stop applying input constructors in a manual way that defeats their purpose (if each is applied through a helper, what's the point of keeping them in a mapping from the name of the arg they are going to construct, to a callable that constructs it?) This diff: 1. Moves behavior related to injection of "disabled parameters" in the search space, from input constructor (where it's not even guaranteed to apply since that input constructor isn't always used), to generation node (for now; proposed move to adapter is in D89779057 –– let's consider alternatives on that diff, too), with an underlying utility moved to `SearchSpace` to be co-located with the rest of the disabled parameter logic. 2. Reaps `GenerationStrategy.DEFAULT_N`, which was actually unused (or used in one place but always left at its default of 1, only complicating things). D89772029 will deal with this better, with a top-level concurrency setting added via an `ExperimentDesign` object. 3. Applies input constructors generically, in a loop, instead of via helpers per input constructor purpose. This ends up removing a bunch of duplicate logic that lived at different layers within. Differential Revision: D80175141 Privacy Context Container: L1307644
04794e0 to
7c7355b
Compare
Summary: Long-overdue diff to stop applying input constructors in a manual way that defeats their purpose (if each is applied through a helper, what's the point of keeping them in a mapping from the name of the arg they are going to construct, to a callable that constructs it?) This diff: 1. Moves behavior related to injection of "disabled parameters" in the search space, from input constructor (where it's not even guaranteed to apply since that input constructor isn't always used), to generation node (for now; proposed move to adapter is in D89779057 –– let's consider alternatives on that diff, too), with an underlying utility moved to `SearchSpace` to be co-located with the rest of the disabled parameter logic. 2. Reaps `GenerationStrategy.DEFAULT_N`, which was actually unused (or used in one place but always left at its default of 1, only complicating things). D89772029 will deal with this better, with a top-level concurrency setting added via an `ExperimentDesign` object. 3. Applies input constructors generically, in a loop, instead of via helpers per input constructor purpose. This ends up removing a bunch of duplicate logic that lived at different layers within. Reviewed By: saitcakmak Differential Revision: D80175141 Privacy Context Container: L1307644
Summary: When `gen_single_trial` does not call `gen`, we have a few problems, in order of importance: 1. Forgetting to specify `pending_observations` to `gen_single_trial` will result in no `pending_observations` use. This is different from the behavior in the main `gen`, so it's a huge gotcha and could already be causing silent bugs. 2. Unnecessary bifurcation, meaning that more behaviors like 1) could encroach in the future. 3. Repeated operations. Reviewed By: saitcakmak Differential Revision: D80174582 Privacy Context Container: L1307644
Summary: Long-overdue diff to stop applying input constructors in a manual way that defeats their purpose (if each is applied through a helper, what's the point of keeping them in a mapping from the name of the arg they are going to construct, to a callable that constructs it?) This diff: 1. Moves behavior related to injection of "disabled parameters" in the search space, from input constructor (where it's not even guaranteed to apply since that input constructor isn't always used), to generation node (for now; proposed move to adapter is in D89779057 –– let's consider alternatives on that diff, too), with an underlying utility moved to `SearchSpace` to be co-located with the rest of the disabled parameter logic. 2. Reaps `GenerationStrategy.DEFAULT_N`, which was actually unused (or used in one place but always left at its default of 1, only complicating things). D89772029 will deal with this better, with a top-level concurrency setting added via an `ExperimentDesign` object. 3. Applies input constructors generically, in a loop, instead of via helpers per input constructor purpose. This ends up removing a bunch of duplicate logic that lived at different layers within. Reviewed By: saitcakmak Differential Revision: D80175141 Privacy Context Container: L1307644
Summary: Long-overdue diff to stop applying input constructors in a manual way that defeats their purpose (if each is applied through a helper, what's the point of keeping them in a mapping from the name of the arg they are going to construct, to a callable that constructs it?) This diff: 1. Moves behavior related to injection of "disabled parameters" in the search space, from input constructor (where it's not even guaranteed to apply since that input constructor isn't always used), to generation node (for now; proposed move to adapter is in D89779057 –– let's consider alternatives on that diff, too), with an underlying utility moved to `SearchSpace` to be co-located with the rest of the disabled parameter logic. 2. Reaps `GenerationStrategy.DEFAULT_N`, which was actually unused (or used in one place but always left at its default of 1, only complicating things). D89772029 will deal with this better, with a top-level concurrency setting added via an `ExperimentDesign` object. 3. Applies input constructors generically, in a loop, instead of via helpers per input constructor purpose. This ends up removing a bunch of duplicate logic that lived at different layers within. Reviewed By: saitcakmak Differential Revision: D80175141 Privacy Context Container: L1307644
7c7355b to
5c1ebdf
Compare
Summary:
Long-overdue diff to stop applying input constructors in a manual way that defeats their purpose (if each is applied through a helper, what's the point of keeping them in a mapping from the name of the arg they are going to construct, to a callable that constructs it?)
This diff:
SearchSpaceto be co-located with the rest of the disabled parameter logic.GenerationStrategy.DEFAULT_N, which was actually unused (or used in one place but always left at its default of 1, only complicating things). D89772029 will deal with this better, with a top-level concurrency setting added via anExperimentDesignobject.Differential Revision:
D80175141
Privacy Context Container: L1307644