Skip to content
This repository has been archived by the owner on Dec 18, 2023. It is now read-only.

Enabling algorithm-specific default num_adaptive_samples #1353

Closed

Commits on Feb 23, 2022

  1. Enabling algorithm-specific default num_adaptive_samples

    Summary:
    The number of adaptive samples for all algorithm is set to 0 by default, which is okay for algorithms like ancestral MH or NMC, but not for HMC and NUTS. Per our previous discussion, instead of using the same default value for all algorithms, a better solution is to let each algorithm determine how many adaptive iterations are necessary. For compositional inference, it will look up the number of adaptive samples required by each inference method in the config and default to the maximum among them (see [Option 3 in Warmup Design](https://fb.quip.com/jzFvAai8ogWV#temp:C:WMIc97e2ffd843b4ab19bbe40c7c) for details).
    
    This diff implement this idea by introducing a `_get_default_num_adaptive_samples` private method on `BaseInference`, which is default to 0. Algorithms can override the default behavior by overloading the method.
    
    Differential Revision: D34404061
    
    fbshipit-source-id: 5c073abb3abb993cf96ba5ef13e0923e859e6b09
    horizon-blue authored and facebook-github-bot committed Feb 23, 2022
    Configuration menu
    Copy the full SHA
    1743e92 View commit details
    Browse the repository at this point in the history