Code Monkey home page Code Monkey logo

r-rstan-feedstock's Introduction

About r-rstan-feedstock

Feedstock license: BSD-3-Clause

About r-rstan

Home: http://discourse.mc-stan.org, http://mc-stan.org

Package license: GPL-3.0-or-later

Summary: User-facing R functions are provided to parse, compile, test, estimate, and analyze Stan models by accessing the header-only Stan library provided by the 'StanHeaders' package. The Stan project develops a probabilistic programming language that implements full Bayesian statistical inference via Markov Chain Monte Carlo, rough Bayesian inference via 'variational' approximation, and (optionally penalized) maximum likelihood estimation via optimization. In all three cases, automatic differentiation is used to quickly and accurately evaluate gradients without burdening the user with the need to derive the partial derivatives.

About r-rstan

Home: http://discourse.mc-stan.org, http://mc-stan.org

Package license: GPL-3.0-or-later

Summary: User-facing R functions are provided to parse, compile, test, estimate, and analyze Stan models by accessing the header-only Stan library provided by the 'StanHeaders' package. The Stan project develops a probabilistic programming language that implements full Bayesian statistical inference via Markov Chain Monte Carlo, rough Bayesian inference via 'variational' approximation, and (optionally penalized) maximum likelihood estimation via optimization. In all three cases, automatic differentiation is used to quickly and accurately evaluate gradients without burdening the user with the need to derive the partial derivatives.

Current build status

Travis linux
Azure
VariantStatus
linux_64_r_base4.2 variant
linux_64_r_base4.3 variant
linux_aarch64_r_base4.2 variant
linux_aarch64_r_base4.3 variant
linux_ppc64le_r_base4.2 variant
linux_ppc64le_r_base4.3 variant
osx_64_r_base4.2 variant
osx_64_r_base4.3 variant
osx_arm64_r_base4.2 variant
osx_arm64_r_base4.3 variant

Current release info

Name Downloads Version Platforms
Conda Recipe Conda Downloads Conda Version Conda Platforms

Installing r-rstan

Installing r-rstan from the conda-forge channel can be achieved by adding conda-forge to your channels with:

conda config --add channels conda-forge
conda config --set channel_priority strict

Once the conda-forge channel has been enabled, r-rstan can be installed with conda:

conda install r-rstan

or with mamba:

mamba install r-rstan

It is possible to list all of the versions of r-rstan available on your platform with conda:

conda search r-rstan --channel conda-forge

or with mamba:

mamba search r-rstan --channel conda-forge

Alternatively, mamba repoquery may provide more information:

# Search all versions available on your platform:
mamba repoquery search r-rstan --channel conda-forge

# List packages depending on `r-rstan`:
mamba repoquery whoneeds r-rstan --channel conda-forge

# List dependencies of `r-rstan`:
mamba repoquery depends r-rstan --channel conda-forge

About conda-forge

Powered by NumFOCUS

conda-forge is a community-led conda channel of installable packages. In order to provide high-quality builds, the process has been automated into the conda-forge GitHub organization. The conda-forge organization contains one repository for each of the installable packages. Such a repository is known as a feedstock.

A feedstock is made up of a conda recipe (the instructions on what and how to build the package) and the necessary configurations for automatic building using freely available continuous integration services. Thanks to the awesome service provided by Azure, GitHub, CircleCI, AppVeyor, Drone, and TravisCI it is possible to build and upload installable packages to the conda-forge anaconda.org channel for Linux, Windows and OSX respectively.

To manage the continuous integration and simplify feedstock maintenance conda-smithy has been developed. Using the conda-forge.yml within this repository, it is possible to re-render all of this feedstock's supporting files (e.g. the CI configuration files) with conda smithy rerender.

For more information please check the conda-forge documentation.

Terminology

feedstock - the conda recipe (raw material), supporting scripts and CI configuration.

conda-smithy - the tool which helps orchestrate the feedstock. Its primary use is in the construction of the CI .yml files and simplify the management of many feedstocks.

conda-forge - the place where the feedstock and smithy live and work to produce the finished article (built conda distributions)

Updating r-rstan-feedstock

If you would like to improve the r-rstan recipe or build a new package version, please fork this repository and submit a PR. Upon submission, your changes will be run on the appropriate platforms to give the reviewer an opportunity to confirm that the changes result in a successful build. Once merged, the recipe will be re-built and uploaded automatically to the conda-forge channel, whereupon the built conda packages will be available for everybody to install and use from the conda-forge channel. Note that all branches in the conda-forge/r-rstan-feedstock are immediately built and any created packages are uploaded, so PRs should be based on branches in forks and branches in the main repository should only be used to build distinct package versions.

In order to produce a uniquely identifiable distribution:

  • If the version of a package is not being increased, please add or increase the build/number.
  • If the version of a package is being increased, please remember to return the build/number back to 0.

Feedstock Maintainers

r-rstan-feedstock's People

Contributors

bgruening avatar cbrueffer avatar conda-forge-admin avatar conda-forge-curator[bot] avatar dbast avatar dpryan79 avatar github-actions[bot] avatar mariusvniekerk avatar mfansler avatar regro-cf-autotick-bot avatar rluria14 avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

r-rstan-feedstock's Issues

Add beta/rc channel builds for RStan 2.26

The Stan Development team has released a version of RStan/StanHeaders which supports Stan 2.26, available here:
https://github.com/stan-dev/r-packages. More information here: https://mc-stan.org/r-packages/

This version will be on CRAN once some backwards dependencies have been updated. It would be really wonderful in the mean time if this was available on Conda as well.

I am the maintainer of the other Stan backend, CmdStan, on Conda, but I am not very familiar with the R environment or how possible this will be.

stanheaders and bh packages need to be specified in win64

Issue:
I'm using a Windows 10 machine with a "self-contained" toolchain (rather than a global install of Rtools) following the instructions here: https://github.com/ContinuumIO/anaconda-issues/wiki/Install-R-Packages. That has been the only way I've been able to get rstan to work in a conda environment. However, what I've noticed are:

  1. The default version of r-stanheaders installed is ahead of r-rstan,
  2. The default version of r-bh installed does not match the version of r-rstan.

The way I've gotten around these issues is to specify a version of r-rstan, r-stanheaders, and r-bh that all seem to play nice together, but that counter to the intent of conda, since it should "just work" when telling conda to install rstan.

Below are the instructions I follow (I tried to make it as minimal a reprex as possible). Note that if I specify r-rstan=2.17, r-stanheaders=2.17, and r-bh=1.66 in my .yml file then everything works fine.


Reprex/instructions:
  1. Create an tmp.yml file in some working directory:
name: tmp
channels:
  - conda-forge
  - r
  - defaults
dependencies:
#Some useful instructions for installing R packages via conda on Windows:
# https://github.com/ContinuumIO/anaconda-issues/wiki/Install-R-Packages
  # Toolchain (what Rtools usually takes care of)
  - m2w64-toolchain
  - m2-make
  - m2-sed
  - m2-zip
  - m2-gzip
  - m2-tar
  - m2-texinfo
  - m2-coreutils
  #R stuff
  - r-base
  - r-rstan
  - r-stanheaders
  - r-bh
  1. Create the environment:
conda env create -f tmp.yml
  1. Navigate to the environment's Library directory and add a tmp folder. This is, for some reason, necessary for the toolchain (see the ContinuumIO link). For example, on my computer, this would result in the following folder structure:
C:\Users\Trader\miniconda3\envs\tmp\Library\tmp
  1. Activate the environment:
conda activate tmp
  1. Create a .Renviron file. For some reason, I can't change the system variables in an R session (I have been able to do this from RStudio, but I'm trying to reduce the overhead of this example).
R_HOME=C:/Users/Trader/miniconda3/envs/tmp/lib/R
R_LIBS_USER=C:/Users/Trader/miniconda3/envs/tmp/R/library
R_USER=C:/Users/Trader/miniconda3/envs/tmp
  1. Test that the installation worked properly, start up R:
R.exe
  1. Inside of R, test that the toolchain works:
pkgbuild::has_build_tools(debug = TRUE) #Should return TRUE, and does for me.
  1. Test that {rstan} works. This breaks when I try to fit the model.
library(rstan)

model_text <- "data {
  int<lower=0> J;         // number of schools 
  real y[J];              // estimated treatment effects
  real<lower=0> sigma[J]; // standard error of effect estimates 
}
parameters {
  real mu;                // population treatment effect
  real<lower=0> tau;      // standard deviation in treatment effects
  vector[J] eta;          // unscaled deviation from mu by school
}
transformed parameters {
  vector[J] theta = mu + tau * eta;        // school treatment effects
}
model {
  target += normal_lpdf(eta | 0, 1);       // prior log-density
  target += normal_lpdf(y | theta, sigma); // log-likelihood
}"

schools_dat <- list(J = 8, 
                    y = c(28,  8, -3,  7, -1,  1, 18, 12),
                    sigma = c(15, 10, 16, 11,  9, 11, 10, 18))

fit <- stan(model_code = model_text, data = schools_dat)

The error from the last line of code:

Error in stan_model(file, model_name = model_name, model_code = model_code,  : 
  StanHeaders version is ahead of rstan version; see https://github.com/stan-dev/rstan/wiki/RStan-Transition-Periods

Environment (conda list):
$ conda list
# Name                    Version                   Build  Channel
_r-mutex                  1.0.1               anacondar_1    conda-forge
intel-openmp              2020.0                      166
libblas                   3.8.0                    15_mkl    conda-forge
liblapack                 3.8.0                    15_mkl    conda-forge
m2-bash                   4.3.042                       5
m2-coreutils              8.25                        102
m2-db                     5.3.28                        3
m2-gcc-libs               5.3.0                         4
m2-gdbm                   1.11                          4
m2-gmp                    6.1.0                         3
m2-gzip                   1.7                           2
m2-info                   6.0                           2
m2-less                   481                           2
m2-libbz2                 1.0.6                         3
m2-libcrypt               1.3                           2
m2-libdb                  5.3.28                        3
m2-libgdbm                1.11                          4
m2-libiconv               1.14                          3
m2-libintl                0.19.7                        4
m2-libpcre                8.38                          2
m2-make                   4.1                           5
m2-msys2-runtime          2.5.0.17080.65c939c               3
m2-ncurses                6.0.20160220                  2
m2-perl                   5.22.1                        2
m2-sed                    4.2.2                         3
m2-tar                    1.28                          4
m2-texinfo                6.0                           2
m2-zip                    3.0                           2
m2w64-binutils            2.25.1                        5
m2w64-bwidget             1.9.10                        2
m2w64-bzip2               1.0.6                         6
m2w64-crt-git             5.0.0.4636.2595836               2
m2w64-expat               2.1.1                         2
m2w64-fftw                3.3.4                         6
m2w64-flac                1.3.1                         3
m2w64-gcc                 5.3.0                         6
m2w64-gcc-ada             5.3.0                         6
m2w64-gcc-fortran         5.3.0                         6
m2w64-gcc-libgfortran     5.3.0                         6
m2w64-gcc-libs            5.3.0                         7
m2w64-gcc-libs-core       5.3.0                         7
m2w64-gcc-objc            5.3.0                         6
m2w64-gettext             0.19.7                        2
m2w64-gmp                 6.1.0                         2
m2w64-gsl                 2.1                           2
m2w64-headers-git         5.0.0.4636.c0ad18a               2
m2w64-isl                 0.16.1                        2
m2w64-libiconv            1.14                          6
m2w64-libjpeg-turbo       1.4.2                         3
m2w64-libmangle-git       5.0.0.4509.2e5a9a2               2
m2w64-libogg              1.3.2                         3
m2w64-libpng              1.6.21                        2
m2w64-libsndfile          1.0.26                        2
m2w64-libtiff             4.0.6                         2
m2w64-libvorbis           1.3.5                         2
m2w64-libwinpthread-git   5.0.0.4634.697f757               2
m2w64-libxml2             2.9.3                         4
m2w64-make                4.1.2351.a80a8b8               2
m2w64-mpc                 1.0.3                         3
m2w64-mpfr                3.1.4                         4
m2w64-openblas            0.2.19                        1
m2w64-pcre                8.38                          2
m2w64-pkg-config          0.29.1                        2
m2w64-speex               1.2rc2                        3
m2w64-speexdsp            1.2rc3                        3
m2w64-tcl                 8.6.5                         3
m2w64-tk                  8.6.5                         3
m2w64-tktable             2.10                          5
m2w64-toolchain           5.3.0                         7
m2w64-tools-git           5.0.0.4592.90b8472               2
m2w64-windows-default-manifest 6.4                           3
m2w64-wineditline         2.101                         5
m2w64-winpthreads-git     5.0.0.4634.697f757               2
m2w64-xz                  5.2.2                         2
m2w64-zlib                1.2.8                        10
mkl                       2020.0                      166
msys2-conda-epoch         20160418                      1
r-assertthat              0.2.1             r35h6115d3f_1    conda-forge
r-backports               1.1.6             r35hda5aaf8_1    conda-forge
r-base                    3.5.1             h0c8e037_1012    conda-forge
r-bh                      1.72.0_3          r35h6115d3f_0    conda-forge
r-callr                   3.4.3             r35h6115d3f_0    conda-forge
r-cli                     2.0.2             r35h6115d3f_0    conda-forge
r-colorspace              1.4_1             r35hda5aaf8_1    conda-forge
r-crayon                  1.3.4           r35h6115d3f_1002    conda-forge
r-desc                    1.2.0           r35h6115d3f_1002    conda-forge
r-digest                  0.6.25            r35h796a38f_1    conda-forge
r-ellipsis                0.3.0             r35hda5aaf8_0    conda-forge
r-evaluate                0.14              r35h6115d3f_1    conda-forge
r-fansi                   0.4.1             r35hda5aaf8_0    conda-forge
r-farver                  2.0.3             r35h796a38f_0    conda-forge
r-ggplot2                 3.3.0             r35h6115d3f_0    conda-forge
r-glue                    1.4.0             r35hda5aaf8_0    conda-forge
r-gridextra               2.3             r35h6115d3f_1002    conda-forge
r-gtable                  0.3.0             r35h6115d3f_2    conda-forge
r-inline                  0.3.15          r35h6115d3f_1001    conda-forge
r-isoband                 0.2.1             r35h796a38f_0    conda-forge
r-labeling                0.3             r35h6115d3f_1002    conda-forge
r-lattice                 0.20_41           r35hda5aaf8_1    conda-forge
r-lifecycle               0.2.0             r35h6115d3f_0    conda-forge
r-magrittr                1.5             r35h6115d3f_1002    conda-forge
r-mass                    7.3_51.6          r35hda5aaf8_1    conda-forge
r-matrix                  1.2_18            r35h0adb578_2    conda-forge
r-mgcv                    1.8_31            r35h0adb578_0    conda-forge
r-munsell                 0.5.0           r35h6115d3f_1002    conda-forge
r-nlme                    3.1_147           r35h17ddedb_0    conda-forge
r-pillar                  1.4.3             r35h6115d3f_0    conda-forge
r-pkgbuild                1.0.7             r35h6115d3f_0    conda-forge
r-pkgconfig               2.0.3             r35h6115d3f_0    conda-forge
r-pkgload                 1.0.2           r35h796a38f_1001    conda-forge
r-praise                  1.0.0           r35h6115d3f_1003    conda-forge
r-prettyunits             1.1.1             r35h6115d3f_0    conda-forge
r-processx                3.4.2             r35hda5aaf8_0    conda-forge
r-ps                      1.3.2             r35hda5aaf8_0    conda-forge
r-r6                      2.4.1             r35h6115d3f_0    conda-forge
r-rcolorbrewer            1.1_2           r35h6115d3f_1002    conda-forge
r-rcpp                    1.0.4.6           r35h796a38f_0    conda-forge
r-rcppeigen               0.3.3.7.0         r35h796a38f_0    conda-forge
r-rlang                   0.4.5             r35hda5aaf8_2    conda-forge
r-rprojroot               1.3_2           r35h6115d3f_1002    conda-forge
r-rstan                   2.17.3           r351h6115d3f_2    conda-forge
r-rstudioapi              0.11              r35h6115d3f_0    conda-forge
r-scales                  1.1.0             r35h6115d3f_0    conda-forge
r-stanheaders             2.21.0_1          r35h5b3a9a7_0    conda-forge
r-testthat                2.3.2             r35h796a38f_0    conda-forge
r-tibble                  3.0.1             r35hda5aaf8_0    conda-forge
r-utf8                    1.1.4           r35hda5aaf8_1002    conda-forge
r-vctrs                   0.2.4             r35hda5aaf8_0    conda-forge
r-viridislite             0.3.0           r35h6115d3f_1002    conda-forge
r-withr                   2.2.0             r35h6115d3f_0    conda-forge
r-zeallot                 0.1.0           r35h6115d3f_1001    conda-forge

Details about conda and system ( conda info ):
$ conda info
active environment : tmp
    active env location : C:\Users\Trader\miniconda3\envs\tmp
            shell level : 2
       user config file : C:\Users\Trader\.condarc
 populated config files : C:\Users\Trader\.condarc
          conda version : 4.8.3
    conda-build version : not installed
         python version : 3.7.6.final.0
       virtual packages : __cuda=10.1
       base environment : C:\Users\Trader\miniconda3  (writable)
           channel URLs : https://repo.anaconda.com/pkgs/main/win-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/win-64
                          https://repo.anaconda.com/pkgs/r/noarch
                          https://repo.anaconda.com/pkgs/msys2/win-64
                          https://repo.anaconda.com/pkgs/msys2/noarch
          package cache : C:\Users\Trader\miniconda3\pkgs
                          C:\Users\Trader\.conda\pkgs
                          C:\Users\Trader\AppData\Local\conda\conda\pkgs
       envs directories : C:\Users\Trader\miniconda3\envs
                          C:\Users\Trader\.conda\envs
                          C:\Users\Trader\AppData\Local\conda\conda\envs
               platform : win-64
             user-agent : conda/4.8.3 requests/2.23.0 CPython/3.7.6 Windows/10 Windows/10.0.18362
          administrator : False
             netrc file : None
           offline mode : False

I'm pretty new to conda, but if there is some way I can help, please let me know. I very much appreciate the effort you all have put into developing this package.

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.