Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update for Stan 2.35 #659

Merged
merged 6 commits into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,23 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04]
python-version: ["3.9", "3.10"]
os: [ubuntu-22.04]
python-version: ["3.10", "3.11"]
include:
- os: ubuntu-22.04
python-version: "3.11"
- os: macos-11.0
- os: ubuntu-24.04
python-version: "3.12"
- os: macos-12
python-version: "3.10"
- os: macos-11.0
- os: macos-13
python-version: "3.11"
- os: macos-13
python-version: "3.12"
steps:
- name: Check out repository
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@

PYBIND11_VERSION := 2.9.2
RAPIDJSON_VERSION := 1.1.0
STAN_VERSION := 2.34.1
STANC_VERSION := 2.34.0
MATH_VERSION := 4.8.1
STAN_VERSION := 2.35.0
STANC_VERSION := 2.35.0
MATH_VERSION := 4.9.0
# NOTE: boost, eigen, sundials, and tbb versions must match those found in Stan Math
BOOST_VERSION := 1.81.0
BOOST_VERSION := 1.84.0
EIGEN_VERSION := 3.4.0
SUNDIALS_VERSION := 6.1.1
TBB_VERSION := 2020.3
Expand Down
4 changes: 3 additions & 1 deletion httpstan/stan_services.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@

namespace py = pybind11;

using rng_t = boost::random::mixmax;

// forward declaration for function defined in another translation unit
stan::model::model_base &new_model(stan::io::var_context &data_context, unsigned int seed, std::ostream *msg_stream);

Expand Down Expand Up @@ -203,7 +205,7 @@ std::vector<double> log_prob_grad(py::dict data, const std::vector<double> &unco
// See exported docstring
std::vector<double> write_array(py::dict data, const std::vector<double> &unconstrained_parameters,
bool include_tparams = true, bool include_gqs = true) {
boost::ecuyer1988 base_rng(0);
rng_t base_rng(0);
std::vector<double> params_r_constrained;
stan::io::array_var_context &var_context = new_array_var_context(data);
// random_seed, the second argument, is unused but the function requires it.
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "httpstan"
version = "4.12.0"
version = "4.13.0"
description = "HTTP-based interface to Stan, a package for Bayesian inference."
authors = [
"Allen Riddell <[email protected]>",
Expand Down Expand Up @@ -30,13 +30,13 @@ include = [
]

[tool.poetry.dependencies]
python = "^3.9"
python = "^3.10"
setuptools = ">=48.0"
aiohttp = "^3.7"
appdirs = "^1.4"
webargs = "^8.0"
marshmallow = "^3.10"
numpy = "^1.19"
numpy = ">=1.19"

[tool.poetry.dev-dependencies]
pytest = "^6.2"
Expand Down