@@ -42,18 +42,18 @@ Compile the Stan model
4242The: :class: `CmdStanModel ` class provides methods
4343to compile and run the Stan program.
4444A CmdStanModel object can be instantiated by specifying
45- either a Stan file or the executable file.
45+ either a Stan file or the executable file, or both.
46+ If only the Stan file path is specified, the constructor will
47+ check for the existence of a correspondingly named exe file in
48+ the same directory. If found, it will use this as the exe file path.
4649
4750By default, when a CmdStanModel object is instantiated from a Stan file,
48- CmdStanPy will automatically compile the model if:
51+ the constructor will compile the model as needed.
52+ The constructor argument `compile ` controls this behavior.
4953
50- - CmdStanPy cannot find a corresponding executable file in the same directory, or
51- - The timestamp on the executable is older than the Stan file.
52-
53- The argument `compile ` controls this behavoir.
54- When ``False `` the model object doesn't try to compile the Stan file.
55- When ``True `` the model compiles the Stan file only if the timestamp is older than the Stan file.
56- When ``Force `` the model always compiles or recompiles the mode.
54+ * ``compile=False ``: never compile the Stan file.
55+ * ``compile=Force ``: always compile the Stan file.
56+ * ``compile=True ``: (default) compile the Stan file as needed, i.e., if no exe file exists or if the Stan file is newer than the exe file.
5757
5858.. code-block :: python
5959
@@ -67,6 +67,9 @@ When ``Force`` the model always compiles or recompiles the mode.
6767 my_model.exe_file
6868 my_model.code()
6969
70+ The CmdStanModel class also provides the :meth: `~CmdStanModel.compile ` method,
71+ which can be called at any point to (re)compile the model as needed.
72+
7073Model compilation is carried out via the GNU Make build tool.
7174The CmdStan ``makefile `` contains a set of general rules which
7275specify the dependencies between the Stan program and the
0 commit comments