Skip to content

Commit 5e2cc05

Browse files
committed
make adjustments for show(::Machine)
1 parent 0bebcd2 commit 5e2cc05

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/machines.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,16 +375,18 @@ machines(::Source) = Machine[]
375375
_cache_status(::Machine{<:Any,true}) = " caches data"
376376
_cache_status(::Machine{<:Any,false}) = " does not cache data"
377377

378+
Base.show(io::IO, mach::Machine) = print(io, "machine($(mach.model), …)")
378379
function Base.show(io::IO, ::MIME"text/plain", mach::Machine{M}) where M
379-
show(io, mach)
380+
#show(io, mach)
381+
print(io, "Machine")
380382
print(io, " trained $(mach.state) time")
381383
if mach.state == 1
382384
print(io, ";")
383385
else
384386
print(io, "s;")
385387
end
386388
println(io, _cache_status(mach))
387-
println(io, " model: $M")
389+
println(io, " model: $(mach.model)")
388390
println(io, " args: ")
389391
for i in eachindex(mach.args)
390392
arg = mach.args[i]

0 commit comments

Comments
 (0)