You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BridgeStan's Python interface can automatically download the BridgeStan source code "the first time you need it", as the documentation describes. In the code, this is performed by get_bridgestan_src() which is called by get_bridgestan_path which is called by compile_model(). Therefore "the first time you need" BridgeStan source code really means the first time a model is compiled.
While this makes sense, most of the (limited) BridgeStan examples I've seen begin with the set_bridgestan_path() function. When using BridgeStan for the first time, set_bridgestan_path() will call verify_bridgestan_path() and throw an error (since BridgeStan source code is not installed and get_bridgestan_src() was never called).
To resolve this issue, I had to dive into the source code and call get_bridgestan_src() manually. If indeed most BridgeStan projects begin with set_bridgestan_path(), I imagine many other new users may face the same issue.
I want to suggest two small improvements to fix this:
In the documentation, replace "the first time you need it" with "the first time a model is compiled"
Update the error message in verify_bridgestan_path() to suggest to users how to download the BridgeStan source code. Perhaps something like: "if this is your first time using BridgeStan, call get_bridgestan_src() immediately before the set_bridgestan_path() function." This may, however, negate the automatic downloading of BridgeStan source code that was intended in the first place.
Any suggestions or feedback is welcome.
The text was updated successfully, but these errors were encountered:
If indeed most BridgeStan projects begin with set_bridgestan_path(), I imagine many other new users may face the same issue.
The only reason to do this is if you are using your own version of bridgestan, such as checking out the source repository, in which case the 'downloaded for you' feature is already moot. If you're hoping to benefit from the automatic downloading, using set_bridgestan_path is never necessary (and in general would prevent it)
BridgeStan's Python interface can automatically download the BridgeStan source code "the first time you need it", as the documentation describes. In the code, this is performed by
get_bridgestan_src()
which is called byget_bridgestan_path
which is called bycompile_model()
. Therefore "the first time you need" BridgeStan source code really means the first time a model is compiled.While this makes sense, most of the (limited) BridgeStan examples I've seen begin with the
set_bridgestan_path()
function. When using BridgeStan for the first time,set_bridgestan_path()
will callverify_bridgestan_path()
and throw an error (since BridgeStan source code is not installed andget_bridgestan_src()
was never called).To resolve this issue, I had to dive into the source code and call
get_bridgestan_src()
manually. If indeed most BridgeStan projects begin withset_bridgestan_path()
, I imagine many other new users may face the same issue.I want to suggest two small improvements to fix this:
verify_bridgestan_path()
to suggest to users how to download the BridgeStan source code. Perhaps something like: "if this is your first time using BridgeStan, callget_bridgestan_src()
immediately before theset_bridgestan_path()
function." This may, however, negate the automatic downloading of BridgeStan source code that was intended in the first place.Any suggestions or feedback is welcome.
The text was updated successfully, but these errors were encountered: