Commit 54dc100
Move add_trial_type, update_runner, supports_trial_type to base Experiment
Summary:
Phase 3 of moving MultiTypeExperiment features into base Experiment.
Moves `add_trial_type` and `update_runner` from MultiTypeExperiment to the base Experiment class, making them available to all experiments.
Updates `supports_trial_type` to unify the logic: for multi-type experiments (where `default_trial_type` is set), only trial types registered in `_trial_type_to_runner` are supported. For single-type experiments, `None` is supported along with `SHORT_RUN` and `LONG_RUN` for backward compatibility with generation strategies that use those trial types.
Removes the corresponding overrides from MultiTypeExperiment — all three methods are now inherited from the base class.
Differential Revision: D949885771 parent fcb63d7 commit 54dc100
2 files changed
Lines changed: 32 additions & 36 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2047 | 2047 | | |
2048 | 2048 | | |
2049 | 2049 | | |
| 2050 | + | |
| 2051 | + | |
| 2052 | + | |
| 2053 | + | |
| 2054 | + | |
| 2055 | + | |
| 2056 | + | |
| 2057 | + | |
| 2058 | + | |
| 2059 | + | |
| 2060 | + | |
| 2061 | + | |
| 2062 | + | |
| 2063 | + | |
| 2064 | + | |
| 2065 | + | |
| 2066 | + | |
| 2067 | + | |
| 2068 | + | |
| 2069 | + | |
| 2070 | + | |
| 2071 | + | |
| 2072 | + | |
| 2073 | + | |
| 2074 | + | |
2050 | 2075 | | |
2051 | 2076 | | |
2052 | 2077 | | |
| |||
2061 | 2086 | | |
2062 | 2087 | | |
2063 | 2088 | | |
2064 | | - | |
2065 | | - | |
| 2089 | + | |
| 2090 | + | |
| 2091 | + | |
| 2092 | + | |
| 2093 | + | |
2066 | 2094 | | |
| 2095 | + | |
| 2096 | + | |
2067 | 2097 | | |
2068 | 2098 | | |
2069 | 2099 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | 107 | | |
121 | 108 | | |
122 | 109 | | |
| |||
130 | 117 | | |
131 | 118 | | |
132 | 119 | | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | 120 | | |
148 | 121 | | |
149 | 122 | | |
| |||
232 | 205 | | |
233 | 206 | | |
234 | 207 | | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | 208 | | |
243 | 209 | | |
244 | 210 | | |
| |||
0 commit comments