Skip to content

Return time in read_cmdstan_csv for MCMC#414

Merged
rok-cesnovar merged 7 commits intomasterfrom
time_in_read_cmdstan_csv
Dec 20, 2020
Merged

Return time in read_cmdstan_csv for MCMC#414
rok-cesnovar merged 7 commits intomasterfrom
time_in_read_cmdstan_csv

Conversation

@rok-cesnovar
Copy link
Copy Markdown
Member

Summary

read_cmdstan_csv now returns time if MCMC CSVs are used.

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:

@rok-cesnovar rok-cesnovar requested a review from jgabry December 19, 2020 21:03
@codecov-io
Copy link
Copy Markdown

codecov-io commented Dec 19, 2020

Codecov Report

Merging #414 (586e9a5) into master (102663b) will increase coverage by 0.10%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #414      +/-   ##
==========================================
+ Coverage   88.19%   88.29%   +0.10%     
==========================================
  Files          12       12              
  Lines        2769     2793      +24     
==========================================
+ Hits         2442     2466      +24     
  Misses        327      327              
Impacted Files Coverage Δ
R/fit.R 96.69% <ø> (ø)
R/read_csv.R 98.88% <100.00%> (+0.07%) ⬆️

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 102663b...586e9a5. Read the comment docs.

Copy link
Copy Markdown
Member

@jgabry jgabry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made a few small changes and added review comments explaining them. If you like them then we can go ahead and merge this. If not then we can revert my changes.

Comment thread R/fit.R
Comment on lines +517 to +518
#' * `total`: (scalar) The total run time. For MCMC this may be different than
#' the sum of the chain run times if parallelization was used.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added this clarification in the fit$time() doc

Comment thread R/read_csv.R
}
list(
metadata = metadata,
time = list(total = NA_integer_, chains = time),
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this keeps the structure consistent with the output of fit$time() but total is NA because we can't infer it from the CSV files

Comment thread R/read_csv.R
Comment on lines +31 to +34
#' * `time`: Run time information for the individual chains. The returned object
#' is the same as for the [$time()][fit-method-time] method except the total run
#' time can't be inferred from the CSV files (the chains may have been run in
#' parallel) and is therefore `NA`.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added some doc for the time component of the returned list

@rok-cesnovar
Copy link
Copy Markdown
Member Author

Thanks. I agree with all changes.

@rok-cesnovar rok-cesnovar merged commit d7190ba into master Dec 20, 2020
@rok-cesnovar rok-cesnovar deleted the time_in_read_cmdstan_csv branch December 20, 2020 06:02
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.

3 participants