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

Breaking change: Disallow CmdStanModel without executable #695

Open
WardBrian opened this issue Sep 7, 2023 · 0 comments
Open

Breaking change: Disallow CmdStanModel without executable #695

WardBrian opened this issue Sep 7, 2023 · 0 comments

Comments

@WardBrian
Copy link
Member

WardBrian commented Sep 7, 2023

Summary:

As discussed in #689.

The current behavior when exe_file=None, compile=False yields a broken object - essentially all methods other than compile() cannot be called until after compile() is called.

I think it should be factored such that:

cmdstanpy.compile(stan_file, force=False, stanc_args={}, cmdstan_args={}) -> str
is a function outside of any class which invokes make as requested.

And the constructor looks like
CmdStanMLE(stan_file=None, exe_file=None, force_compile=False, stanc_args={}, cmdstan_args={})

This raises an error if:

  • stan_file and exe_file are both None, or
  • force_compile is True but stanc_file was None

Otherwise, it will always be the case that when the constructor is finished, we have an executable ready for use (either because the user supplied one, or because we compiled it)

This would be a 2.0 change

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