finalize_estimator
fails in metric summarizers when any column is named name
#382
Labels
bug
an unexpected problem or unintended behavior
The problem
If any column of a data frame passed to
data
is namedname
,finalize_estimator
will fail. This seems to be happening becausename
is being evaluated in the context ofdata
inside ofsummarise
:yardstick/R/template.R
Lines 119 to 120 in 3099e99
Changing both of those lines to use
.env[["name"]]
seems to fix this behavior:Created on 2023-03-02 with reprex v2.0.2
Session info
I only tested with numeric metrics but I believe this is the same for the other summarizers as well.
Reproducible example
Created on 2023-03-02 with reprex v2.0.2
Session info
The text was updated successfully, but these errors were encountered: