Skip to content

Commit 699098a

Browse files
committed
using multi-line diplay for showing PerformanceEvaluation objects
1 parent 4de8d7a commit 699098a

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/measures/measures.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,6 @@ end
149149

150150
# display:
151151
show_as_constructed(::Type{<:Measure}) = true
152-
# show_compact(::Type{<:Measure}) = true
153-
# Base.show(io::IO, m::Measure) = show(io, MIME("text/plain"), m)
154152

155153
# info
156154
function StatisticalTraits.info(M::Type{<:Measure})

src/resampling.jl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,9 @@ _short(v::Vector) = string("[", join(_short.(v), ", "), "]")
531531
_short(::Missing) = missing
532532

533533
function Base.show(io::IO, ::MIME"text/plain", e::PerformanceEvaluation)
534-
_measure = e.measure
534+
_measure = map(e.measure) do m
535+
repr(MIME("text/plain"), m)
536+
end
535537
_measurement = round3.(e.measurement)
536538
_per_fold = [round3.(v) for v in e.per_fold]
537539

@@ -547,7 +549,8 @@ function Base.show(io::IO, ::MIME"text/plain", e::PerformanceEvaluation)
547549
color_off()
548550
PrettyTables.pretty_table(io, data, header;
549551
header_crayon=PrettyTables.Crayon(bold=false),
550-
alignment=:l)
552+
alignment=:l,
553+
linebreaks=true)
551554
show_color ? color_on() : color_off()
552555
end
553556

0 commit comments

Comments
 (0)