Skip to content
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
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ print-% : ; @echo $* = $($*) ;
STANC_DL_RETRY = 5
STANC_DL_DELAY = 10
STANC3_TEST_BIN_URL ?=
STANC3_VERSION ?= v2.38.0
STANC3_VERSION ?= v2.39.0

ifeq ($(OS),Windows_NT)
OS_TAG := windows
Expand Down
2 changes: 1 addition & 1 deletion clients/R/R/zzz.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ HMC_SAMPLER_VARIABLES = c(

PATHFINDER_VARIABLES = c("lp_approx__", "lp__", "path__")

OPTIMIZATION_VARIABLES = c("lp__")
OPTIMIZATION_VARIABLES = c("lp__", "converged__")

LAPLACE_VARIABLES = c("log_p__", "log_g__")

Expand Down
2 changes: 1 addition & 1 deletion clients/julia/src/model.jl
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const HMC_SAMPLER_VARIABLES = [

const PATHFINDER_VARIABLES = ["lp_approx__", "lp__", "path__"]

const OPTIMIZE_VARIABLES = ["lp__"]
const OPTIMIZE_VARIABLES = ["lp__", "converged__"]

const LAPLACE_VARIABLES = ["log_p__", "log_q__"]

Expand Down
2 changes: 1 addition & 1 deletion clients/julia/test/test_laplace.jl
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
@testset for jacobian in [true, false]
out_opt =
optimize(simple_jacobian_model; jacobian = jacobian, seed = UInt32(12345))
mode_array = out_opt.draws[2:end]
mode_array = out_opt.draws[3:end]
out = laplace_sample(
simple_jacobian_model,
mode_array;
Expand Down
2 changes: 1 addition & 1 deletion clients/julia/test/test_optimize.jl
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@

@testset "Model without parameters" begin
out = optimize(empty_model)
@test length(out.names) == 1 # lp
@test length(out.names) == 2 # lp, converged
end


Expand Down
2 changes: 1 addition & 1 deletion clients/python/tests/test_optimize.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def test_bad_init(bernoulli_model):

def test_model_no_params(empty_model):
out = empty_model.optimize()
assert len(out.parameters) == 1 # lp
assert len(out.parameters) == 2 # lp, converged


@pytest.mark.parametrize(
Expand Down
16 changes: 4 additions & 12 deletions clients/python/tinystan/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,19 +66,11 @@ def print_callback(msg, size, is_error):

PATHFINDER_VARIABLES = ["lp_approx__", "lp__", "path__"]

OPTIMIZE_VARIABLES = [
"lp__",
]
OPTIMIZE_VARIABLES = ["lp__", "converged__"]

LAPLACE_VARIABLES = [
"log_p__",
"log_q__",
]
LAPLACE_VARIABLES = ["log_p__", "log_q__"]

FIXED_SAMPLER_VARIABLES = [
"lp__",
"accept_stat__",
]
FIXED_SAMPLER_VARIABLES = ["lp__", "accept_stat__"]


class HMCMetric(Enum):
Expand Down Expand Up @@ -122,7 +114,7 @@ def preprocess_laplace_inputs(
if isinstance(mode, StanOutput):
# handle case of passing optimization output directly
if len(mode.data.shape) == 1:
mode = mode.data[1:]
mode = mode.data[len(OPTIMIZE_VARIABLES) :]
else:
raise ValueError("Laplace can only be used with Optimization output")
# mode = mode.create_inits(chains=1, seed=seed)
Expand Down
2 changes: 1 addition & 1 deletion stan
Submodule stan updated 30 files
+1 −0 .github/CONTRIBUTING.md
+1 −1 .github/ISSUE_TEMPLATE.md
+1 −1 README.md
+10 −0 RELEASE-NOTES.txt
+1 −1 lib/stan_math
+1 −1 src/doxygen/doxygen.cfg
+3 −1 src/stan/io/stan_csv_reader.hpp
+2 −2 src/stan/mcmc/hmc/hamiltonians/ps_point.hpp
+2 −2 src/stan/model/indexing/rvalue.hpp
+7 −4 src/stan/services/optimize/bfgs.hpp
+7 −4 src/stan/services/optimize/lbfgs.hpp
+13 −2 src/stan/services/optimize/newton.hpp
+17 −0 src/stan/services/sample/standalone_gqs.hpp
+34 −0 src/stan/services/util/gq_writer.hpp
+1 −1 src/stan/version.hpp
+25 −0 src/test/unit/mcmc/hmc/hamiltonians/ps_point_test.cpp
+8 −6 src/test/unit/services/optimize/bfgs_jacobian_test.cpp
+8 −7 src/test/unit/services/optimize/bfgs_test.cpp
+8 −6 src/test/unit/services/optimize/lbfgs_jacobian_test.cpp
+8 −7 src/test/unit/services/optimize/lbfgs_test.cpp
+8 −6 src/test/unit/services/optimize/newton_jacobian_test.cpp
+14 −12 src/test/unit/services/optimize/newton_test.cpp
+2 −2 src/test/unit/services/pathfinder/eight_schools_test.cpp
+3 −3 src/test/unit/services/pathfinder/normal_glm_test.cpp
+1 −1 src/test/unit/services/sample/standalone_gqs_2390_test.cpp
+1 −1 src/test/unit/services/sample/standalone_gqs_multidim_test.cpp
+1 −1 src/test/unit/services/sample/standalone_gqs_parallel_test.cpp
+1 −1 src/test/unit/services/sample/standalone_gqs_test.cpp
+12 −0 src/test/unit/services/util/gq_writer_test.cpp
+2 −2 src/test/unit/version_test.cpp
Loading