Coder Social home page Coder Social logo

Comments (9)

WardBrian avatar WardBrian commented on July 23, 2024

The message here is probably a bit misleading, because it doesn't just look for a BridgeStan, it looks for a BridgeStan instance of the matching version if $BRIDGESTAN is not set manually, so it will download a new one if you update your install

get_bridgestan_path() is not really set up to be used in this way -- it is the function that triggers the download when it is not found, so it wouldn't really help here. We can think of alternatives to this design

from bridgestan.

avehtari avatar avehtari commented on July 23, 2024

I was expecting the same behavior as in cmdstanr::cmdstan_path() https://mc-stan.org/cmdstanr/reference/set_cmdstan_path.html

from bridgestan.

WardBrian avatar WardBrian commented on July 23, 2024

We have an intentionally different behavior than cmdstan, where the get_bridgestan_path() function always returns a path, downloading it if necessary.
This is in part because a given version of bridgestan is only ever really intended to work with a single version of the C++ sources, so we know which version we should download. CmdStanR/Py don't really have that notion

from bridgestan.

avehtari avatar avehtari commented on July 23, 2024

Ah, that is not clear from the documentation, which is not mentioning get_bridgestan_path() at all, but advises to make the download separately, and when I use the proposed git clone option, I wanted to check whether the path points to a correct directory, I tried using get_bridgestan_path(), but then it downloaded the latest release and missed that I had the latest version via git.

from bridgestan.

WardBrian avatar WardBrian commented on July 23, 2024

Oh, that's just because I forgot to update the docs after the downloading feature was ported to R in #172.

Here's what we say in Python, which is now true for R as well:

The first time you compile a model, the BridgeStan source code will be downloaded and placed in ~/.bridgestan/. If you prefer to use a source distribution of BridgeStan, consult the following section.
...
To use the BridgeStan source you’ve manually downloaded instead of one the package will download for you, you must use set_bridgestan_path() or the $BRIDGESTAN environment variable.

I will update R's page to say something similar

from bridgestan.

WardBrian avatar WardBrian commented on July 23, 2024

@avehtari I've opened a PR with doc changes -- are you also hoping for any behavior changes, or is just properly explaining the behavior enough to close this?

from bridgestan.

avehtari avatar avehtari commented on July 23, 2024

Function like bridgestan_path() similar to cmdstan_path() would be helpful to check that the environment variable BRIDGESTAN is working. If setting that environment variable did not work for some reason, another (unnecessary) installation is made to ~/.bridgestan.

from bridgestan.

WardBrian avatar WardBrian commented on July 23, 2024

@avehtari would changing the definition of get_bridgestan_path() to accept a download argument (default TRUE) line up with what you were expecting?

from bridgestan.

avehtari avatar avehtari commented on July 23, 2024

Sounds like yes

from bridgestan.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.