Skip to content

Fix inv_metric()#394

Merged
jgabry merged 4 commits intomasterfrom
fix_inv_metric_scientific_notation
Dec 12, 2020
Merged

Fix inv_metric()#394
jgabry merged 4 commits intomasterfrom
fix_inv_metric_scientific_notation

Conversation

@rok-cesnovar
Copy link
Copy Markdown
Member

Summary

Fixes #393

Copyright and Licensing

Please list the copyright holder for the work you are submitting
(this will be you or your assignee, such as a university or company):
Rok Češnovar

By submitting this pull request, the copyright holder is agreeing to
license the submitted work under the following licenses:

…rd output rely on being able to parse the values to numeric. If not, finish parsing inv. metric. Added tests.
@rok-cesnovar
Copy link
Copy Markdown
Member Author

Also ran the example from @maxmantei and with this patch, it runs for all iterations.

library(cmdstanr)
for (i in 1:100){
  f <- cmdstanr_example(method = "sample", metric = "dense_e")
  M <- f$inv_metric()
  if (length(M) != 4){
    print(paste("Try:", i))
    print(M)
    break
  }
}

@codecov-io
Copy link
Copy Markdown

codecov-io commented Dec 11, 2020

Codecov Report

Merging #394 (bd74210) into master (075a595) will increase coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #394      +/-   ##
==========================================
+ Coverage   88.34%   88.37%   +0.02%     
==========================================
  Files          12       12              
  Lines        2720     2726       +6     
==========================================
+ Hits         2403     2409       +6     
  Misses        317      317              
Impacted Files Coverage Δ
R/read_csv.R 98.80% <100.00%> (+0.02%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 075a595...bd74210. Read the comment docs.

Comment thread R/read_csv.R Outdated
Comment thread R/read_csv.R Outdated
@jgabry
Copy link
Copy Markdown
Member

jgabry commented Dec 12, 2020

Looks good! The tests are all starting again because I made an edit to the NEWS file but they were all passing so I'm going to go ahead and merge this.

@jgabry jgabry merged commit 5a02481 into master Dec 12, 2020
@jgabry jgabry deleted the fix_inv_metric_scientific_notation branch December 12, 2020 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sometimes inv_metric does not return one metric per chain, sometimes metrics are incomplete

3 participants