Skip to content
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

Handling of global and local options #117

Open
larshum opened this issue Nov 9, 2022 · 0 comments
Open

Handling of global and local options #117

larshum opened this issue Nov 9, 2022 · 0 comments

Comments

@larshum
Copy link
Contributor

larshum commented Nov 9, 2022

In the current version of cppl, options local to an inference method are not handled correctly. For example, the aligned option of LightweightMCMC, which controls which kind of compilation to use, is ignored, and one has to use the global align option to enable this. Thus, it is impossible to use alignment in one place and disable it in another.

The local options of inference methods must be used to update the "global" options so that we can still pass the global options record to functions that expect it (to remain backward compatible). The problem is that all options local to inference methods may be arbitrary expressions, which may not be known until runtime. What we need is the following:

  • Support for specifying that an option must be a literal value.
  • A way to "update" the global options based on the configuration parameters of an inference method. (Options -> InferMethod -> Options)
  • If we want the global options to take precedence over the local configuration parameters, we also need a way to update the local parameters with non-default values of the global options. (Options -> InferMethod -> InferMethod)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant