Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Visualizations (tensorboard alternative)? #74

Open
jbrea opened this issue Aug 10, 2020 · 1 comment
Open

Visualizations (tensorboard alternative)? #74

jbrea opened this issue Aug 10, 2020 · 1 comment

Comments

@jbrea
Copy link

jbrea commented Aug 10, 2020

Are there any plans to add some Julia-based visualization of the log files (as an alternative to tensorboard)?

I tried the following simple example for the log file of the usage example in the readme.
I think with @essenciary's Stipple.jl one could get something nice here.

using TensorBoardLogger, Genie, Genie.Router, Genie.Renderer.Html,
Stipple, StippleCharts, StippleCharts.Charts

function pushdata!(model, i, v)
    model.i = i
    push!(model.plot_data.val[1].plotdata.data, v)
end

function loaddata(path, var, model; timeout = 1)
    while true
        map_summaries((s, i, v) -> s == var ? pushdata!(model, i, v) : nothing,
                      path, steps = model.i + 1 : typemax(UInt))
        sleep(timeout)
    end
end

Base.@kwdef mutable struct Dashboard <: ReactiveModel
    i::Int = 0
    plot_option::PlotOptions = PlotOptions(chart_type = :scatter)
    plot_data::R{Vector{PlotSeries}} = [PlotSeries(name = "test/j",
                                                   plotdata = PlotData(Float32[]))]
end

Stipple.register_components(Dashboard, StippleCharts.COMPONENTS)
model = Stipple.init(Dashboard)

function ui()
  page(
    root(model), class="container", [
        row([
        cell(class="st-module", [
          h5("Series")
          plot(:plot_data; options = :plot_option)
        ])
      ])
    ], title="TBoardLogger"
  ) |> html
end

route("/", ui)

up()

loaddata("logs/run", "test/j", model) # no auto-refresh of the browser...
@PhilipVinc
Copy link
Member

PhilipVinc commented Aug 19, 2020

Hi, sorry I'm on holidays those days so I seldom check on GitHub.

Anyhow, the TLDR is:
I don't have plans in that direction, but if someone wanted to go down that road I would be glad to chip in.

--
TensorBoardLogger started as an attempt to log to TensorBoard from Julia without requiring a working Python installation.
Right now it can serialise (and deserialise) TensorBoard .proto files.
The front-end (tensoboard) is a separate program. If you wanted to write a different frontend, using Stripple or anything else really, I think the best direction would be starting a new package, and rely on map_summaries, as you did.

If anyone was to do this, I would surely help by improving the map_summaries interface and it's performance, and there is also some leeway to add some more metadata to the .proto files, that will keep the files compatible with tensor board but could provide more info to a new front-end

But I don't have the need for this right now, so I would not be starting it myself. (however, I think it's a very cool idea! Tensorboard has several little things I don't like)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants