Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@ ImageMagick = "6218d12a-5da1-5696-b52f-db25d2ecc6d1"
LightGraphs = "093fc24a-ae57-5d10-9952-331d41423f4d"
Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
PyPlot="d330b81b-6aea-500a-939a-2ce795aea3ee"
PyPlot = "d330b81b-6aea-500a-939a-2ce795aea3ee"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
TestImages = "5e47fb64-e119-507b-a336-dd2b206d9990"
WAV = "8149f6b0-98f6-5db9-b78f-408fbbb8ef88"
Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c"

[targets]
test = ["Test", "Flux", "TestImages", "ImageMagick", "Logging", "LightGraphs", "Plots", "PyPlot", "WAV"]
test = ["Test", "Flux", "TestImages", "ImageMagick", "Logging", "LightGraphs", "Plots", "PyPlot", "WAV", "Tracker"]
3 changes: 3 additions & 0 deletions src/Optional/Tracker.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import .Tracker

preprocess(name, x::T, data) where {T<:Union{Tracker.TrackedReal,Tracker.TrackedArray}}= push!(data, name => Tracker.data(x))
3 changes: 3 additions & 0 deletions src/TensorBoardLogger.jl
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ function __init__()
@require PyPlot="d330b81b-6aea-500a-939a-2ce795aea3ee" begin
include("Optional/PyPlot.jl")
end
@require Tracker="9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" begin
include("Optional/Tracker.jl")
end
end

end # module
13 changes: 13 additions & 0 deletions test/Optional/test_Tracker.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using TensorBoardLogger, Logging
using Tracker
using Test

@testset "Optional: Tracker.jl" begin
logger = TBLogger("test_logs/Tracker-jl", tb_overwrite)
tr = Tracker.TrackedReal(1)
ta = Tracker.TrackedArray(ones(10))
with_logger(logger) do
@info "dispatch" tr=tr
@info "dispatch" ta=ta
end
end
1 change: 1 addition & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -250,4 +250,5 @@ end
include("Optional/test_Plots.jl")
# Don't run PyPlot tests until I figure a way to install the dependencies
#include("Optional/test_PyPlot.jl")
include("Optional/test_Tracker.jl")
end