Closed osorensen closed 5 months ago
Reproduce it on Docker. Here is the relevant part:
> example("compute_mallows_sequentially", "BayesMallows")
cmpt__> # Observe one ranking at each of 12 timepoints
cmpt__> library(ggplot2)
cmpt__> data <- lapply(seq_len(nrow(potato_visual)), function(i) {
cmpt__+ setup_rank_data(potato_visual[i, ])
cmpt__+ })
cmpt__> initial_values <- sample_prior(
cmpt__+ n = 200, n_items = 20,
cmpt__+ priors = set_priors(gamma = 3, lambda = .1))
cmpt__> mod <- compute_mallows_sequentially(
cmpt__+ data = data,
cmpt__+ initial_values = initial_values,
cmpt__+ smc_options = set_smc_options(n_particles = 500, mcmc_steps = 20))
/usr/local/lib/R/site-library/RcppArmadillo/include/armadillo_bits/Mat_meat.hpp:6280:13: runtime error: reference binding to null pointer of type 'const double'
All good after adding user IDs.
> example("compute_mallows_sequentially", "BayesMallows")
cmpt__> # Observe one ranking at each of 12 timepoints
cmpt__> library(ggplot2)
cmpt__> data <- lapply(seq_len(nrow(potato_visual)), function(i) {
cmpt__+ setup_rank_data(potato_visual[i, ], user_ids = i)
cmpt__+ })
cmpt__> initial_values <- sample_prior(
cmpt__+ n = 200, n_items = 20,
cmpt__+ priors = set_priors(gamma = 3, lambda = .1))
cmpt__> mod <- compute_mallows_sequentially(
cmpt__+ data = data,
cmpt__+ initial_values = initial_values,
cmpt__+ smc_options = set_smc_options(n_particles = 500, mcmc_steps = 20))
cmpt__> # We can see the acceptance ratio of the move step for each timepoint:
cmpt__> get_acceptance_ratios(mod)
This time I checked valgrind before submitting, and then we got an UBSAN issue.
https://www.stats.ox.ac.uk/pub/bdr/memtests/gcc-UBSAN/BayesMallows/
Must reproduce it on my Docker image and fix.