Is there a known problem with saving metric files in cmdstanr? Saving all other types of outputs works fine, but fit$save_metric_files() always gives a cryptic error:
> library(cmdstanr)
> fit = cmdstanr_example()
Model executable is up to date!
> fit$save_metric_files(dir="C:/",basename="asdf")
Error in file.remove(current_files[!current_files %in% new_paths]) :
invalid first filename
Explicitly wrapping this in a traceback statement in an R script only gives No traceback available, because the culprit seems to be wrapped in anonymous functions -> <Anonymous> -> <Anonymous> -> file.remove.
Iāve tried this on multiple machines, with all possible permutations of input arguments and working directories. Is this a known problem?
Can you try adding save_metric=TRUE when fitting the model? I think the doc just needs to be clearer that this isnāt the default and the error message needs to be clearer that it couldnāt find the files.
Edit: I see the doc says that the default is TRUE but it seems to not be the case.