@@ -80,12 +80,12 @@ class CmdStanModel:
8080 """
8181 The constructor method allows model instantiation given either the
8282 Stan program source file or the compiled executable, or both.
83- By default, the constructor will compile the Stan program on instantiation
84- unless the argument ``compile=False`` is specified.
85- The set of constructor arguments are:
83+ This will compile the model if provided a Stan file and no executable,
8684
8785 :param model_name: Model name, used for output file names.
8886 Optional, default is the base filename of the Stan program file.
87+ Deprecated: In version 2.0.0, model name cannot be
88+ specified and will always be taken from executable.
8989
9090 :param stan_file: Path to Stan program file.
9191
@@ -94,9 +94,8 @@ class CmdStanModel:
9494 the compiled executable file are specified, the base filenames
9595 must match, (but different directory locations are allowed).
9696
97- :param compile: Whether or not to compile the model. Default is ``True``.
98- If set to the string ``"force"``, it will always compile even if
99- an existing executable is found.
97+ :param force_compile: If ``True``, always compile, even if there
98+ is an existing executable file for this model.
10099
101100 :param stanc_options: Options for stanc compiler, specified as a Python
102101 dictionary containing Stanc3 compiler option name, value pairs.
@@ -109,6 +108,13 @@ class CmdStanModel:
109108 :param user_header: A path to a header file to include during C++
110109 compilation.
111110 Optional.
111+
112+ :param compile: Whether or not to compile the model. Default is ``True``.
113+ If set to the string ``"force"``, it will always compile even if
114+ an existing executable is found.
115+ Deprecated: Use ``force_compile`` instead. The ability to instantiate
116+ a CmdStanModel without an executable will be removed in version 2.0.0.
117+
112118 """
113119
114120 def __init__ (
@@ -126,14 +132,16 @@ def __init__(
126132 """
127133 Initialize object given constructor args.
128134
129- :param model_name: Model name, used for output file names.
135+ :param model_name: Deprecated. Model name, used for output file names.
130136 :param stan_file: Path to Stan program file.
131137 :param exe_file: Path to compiled executable file.
132- :param compile: Whether or not to compile the model.
138+ :param force_compile: Whether or not to force recompilation if
139+ executable file already exists.
133140 :param stanc_options: Options for stanc compiler.
134141 :param cpp_options: Options for C++ compiler.
135142 :param user_header: A path to a header file to include during C++
136143 compilation.
144+ :param compile: Deprecated. Whether or not to compile the model.
137145 """
138146 self ._name = ''
139147 self ._stan_file = None
@@ -446,6 +454,9 @@ def compile(
446454 _internal : bool = False ,
447455 ) -> None :
448456 """
457+ Deprecated: To compile a model, use the :class:`~cmdstanpy.CmdStanModel`
458+ constructor or :func:`cmdstanpy.compile_stan_file()`.
459+
449460 Compile the given Stan program file. Translates the Stan code to
450461 C++, then calls the C++ compiler.
451462
0 commit comments