Skip to content

Commit 95e4b07

Browse files
committed
Documentation for aliases (#772)
Summary: Pull Request resolved: #772 Documentation for configs now detail how to use aliases Reviewed By: adellari Differential Revision: D72883069 fbshipit-source-id: 9ff28a1430db62c869e6efd2933d987b3260a145
1 parent 78240bd commit 95e4b07

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

docs/configs.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,5 +216,36 @@ generator = SobolGenerator
216216
model = GPClassificationModel
217217
```
218218

219+
<h2>Defining objects with aliases</h2>
220+
Some experiment configs will want two copies of the same class with different
221+
parameters. For example, you want two strategies to use the same class of
222+
generator but with different configuration (e.g., OptimizeAcqfGenerator with different
223+
acquisition functions). To do this, the OptimizeAcqfGenerator can be defined with
224+
aliases in strategies as such.
225+
226+
```
227+
[explore_strat]
228+
min_asks = 20
229+
generator = explore_generator
230+
model = GPClassificationModel
231+
232+
[opt_strat]
233+
min_asks = 20
234+
generator = optimize_generator
235+
model = GPClassificationModel
236+
237+
[explore_generator]
238+
class = OptimizeAcqfGenerator
239+
acqf = qNegIntegratedPosteriorVariance
240+
241+
[optimize_generator]
242+
class = OptimizeAcqfGenerator
243+
acqf = EAVC
244+
```
245+
246+
Any object can be defined using an alias. The alias must not match the name of another
247+
object. In the block for an alias, it must have a class option referring to the
248+
original object.
249+
219250
<h2>Controlling the Timing of Trials (Experimental)</h2>
220251
It is often important that each trial in a psychophysics experiment can be completed quickly so that the participant's and experimenter's time is not wasted. As noted elsewhere in this document, there are many settings that can be tweaked to make point generation and model fitting faster, but determining what values these settings should take to meet your timing constraints can take a lot of trial and error. To eliminate this guesswork, we have introduced two settings to explicitly control trial timing. You can set the maximum amount of time, in seconds, that should be spent generating points using max_gen_time under `OptimizeAcqfGenerator`, and you can set the maximum amount of time, in seconds, that should be spent fitting the model using `max_fit_time` under `GPClassificationModel`. These settings are considered experimental because they are still undergoing testing, but our initial findings indicate that they can be used to dramatically decrease computation time with minimal impact on results.

0 commit comments

Comments
 (0)