Repository navigation
Closed
Description
#4711 broke revdep scoringutils https://rcdata.nau.edu/genomic-ml/data.table-revdeps/analyze/2024-07-16/
> system(paste(c("diff -u", Rcheck.list), collapse=" "))
--- R_Under_development_unstable_2024-07-15_r86902/release_1.15.4.Rcheck/00check.log 2024-07-16 01:24:12.695554623 -0700
+++ R_Under_development_unstable_2024-07-15_r86902/master_1.15.99.9e2601e04a88610f28c798d047ebeb6103bd6fb2.Rcheck/00check.log 2024-07-16 01:27:23.045737401 -0700
@@ -54,13 +54,75 @@
* checking data for ASCII and uncompressed saves ... OK
* checking installed files from 'inst/doc' ... OK
* checking files in 'vignettes' ... OK
-* checking examples ... OK
+* checking examples ... ERROR
+Running examples in 'scoringutils-Ex.R' failed
+The error most likely occurred in:
+
+> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
+> ### Name: add_coverage
+> ### Title: Add coverage of central prediction intervals
+> ### Aliases: add_coverage
+> ### Keywords: scoring
+>
+> ### ** Examples
+>
+> library(magrittr) # pipe operator
+> ## Don't show:
+> data.table::setDTthreads(2) # restricts number of cores used on CRAN
+> ## End(Don't show)
+> score(example_quantile) %>%
++ add_coverage(by = c("model", "target_type")) %>%
++ summarise_scores(by = c("model", "target_type")) %>%
++ summarise_scores(fun = signif, digits = 2)
+The following messages were produced when checking inputs:
+1. 144 values for `prediction` are NA in the data provided and the corresponding rows were removed. This may indicate a problem if unexpected.
+Error in startsWith(names(expr)[3L], "na") : non-character object(s)
+Calls: %>% ... summarise_scores -> [ -> [.data.table -> lapply -> FUN -> startsWith
+Execution halted
* checking for unstated dependencies in 'tests' ... OK
-* checking tests ... OK
+* checking tests ... ERROR
Running 'testthat.R'
+Running the tests in 'tests/testthat.R' failed.
+Last 13 lines of output:
+ * plot_pit/plot-pit-quantile.svg
+ * plot_pit/plot-pit-sample.svg
+ * plot_predictions/many-quantiles-from-sample.svg
+ * plot_predictions/many-quantiles.svg
+ * plot_predictions/no-median.svg
+ * plot_predictions/point-forecasts.svg
+ * plot_quantile_coverage/plot-quantile-coverage.svg
+ * plot_ranges/plot-ranges-dispersion.svg
+ * plot_ranges/plot-ranges-interval.svg
+ * plot_score_table/plot-score-table.svg
+ * plot_wis/plot-wis-flip.svg
+ * plot_wis/plot-wis-no-relative.svg
+ * plot_wis/plot-wis.svg
+ Error: Test failures
+ Execution halted
* checking for unstated dependencies in vignettes ... OK
* checking package vignettes ... OK
-* checking re-building of vignette outputs ... OK
+* checking re-building of vignette outputs ... ERROR
+Error(s) in re-building vignettes:
+ ...
+--- re-building 'metric-details.Rmd' using rmarkdown
+--- finished re-building 'metric-details.Rmd'
+
+--- re-building 'scoring-forecasts-directly.Rmd' using rmarkdown
+--- finished re-building 'scoring-forecasts-directly.Rmd'
+
+--- re-building 'scoringutils.Rmd' using rmarkdown
+
+Quitting from lines 180-182 [unnamed-chunk-12] (scoringutils.Rmd)
+Error: processing vignette 'scoringutils.Rmd' failed with diagnostics:
+non-character object(s)
+--- failed re-building 'scoringutils.Rmd'
+
+SUMMARY: processing the following file failed:
+ 'scoringutils.Rmd'
+
+Error: Vignette re-building failed.
+Execution halted
+
* checking PDF version of manual ... OK
* DONE
-Status: OK
+Status: 3 ERRORs
Activity
tdhock commentedon Jul 16, 2024
@MichaelChirico can you please try to figure this one out?
MichaelChirico commentedon Jul 16, 2024
Filed epiforecasts/scoringutils#862
With that PR (and epiforecasts/scoringutils#863 and epiforecasts/scoringutils#864, which are unrelated to data.table per se), I get a clean
R CMD check.Note that it's nothing to do with #4711, so something seems wrong with the bisect logic there, otherwise we're seeing issues already fixed in the dev version of {scoringutils}
tdhock commentedon Jul 17, 2024
thanks! from epiforecasts/scoringutils#862 it looks like the fix was an updated expectation in a test.
That seems to be inconsistent with the diff I reported above (ERROR in re-building vignettes and examples, in addition to tests).
You are right that it could be explained by updates to scoringutils on github (revdep checker uses scoringutils from CRAN which was from Nov 2023).
tdhock commentedon Jul 17, 2024
yes the two versions of scoringutils give different check results with data.table dev (there is no issue with revdep bisect)
tdhock commentedon Jul 17, 2024
in scoringutils CRAN version, the error occurs here
Traceback is
The startsWith call comes from this function in data.table.R
MichaelChirico commentedon Jul 17, 2024
Oh, actually it's
#6284#6232 , not #4711 (one commit later) to blame. See #6291.Thanks for the further investigation, even though revdep dev version no longer errors, the original code still helped us to discover a bug.
tdhock commentedon Jul 17, 2024
Is that a typo? I still don't understand why #4711 came out of git bisect.
[-]revdep scoringutils example/vignette errors[/-][+]revdep scoringutils (.optmean) errors after non-ascii by fix[/+]MichaelChirico commentedon Jul 17, 2024
Yes: #6232 (3ca8373) hit
masterone before #4711 (40758c9).tdhock commentedon Jul 17, 2024
ok, #6232 makes sense as the culprit since our version of startsWith was removed in that PR, and startsWith caused the error in the revdep.
so maybe there is an issue with revdep bisect after all? I don't really understand why git bisect would point to the PR after the culprit, I will file an issue.
tdhock commentedon Jul 17, 2024
could it have something to do with changing %iscall% in #4711 ? 40758c9#diff-60bef5af43a1bd541299ce9bceeb226afb23deaa5e637b145c85e05ffd552b0cR152
MichaelChirico commentedon Jul 17, 2024
I suppose it's possible downstream code wound up in a different branch due to the change, where before #4711
startsWith()doesn't get called.MichaelChirico commentedon Jul 30, 2024
Informed downstream that we'll release in August & to expect a required CRAN update (their dev version is already fixed); closing here.