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

Last call of @info seems not to be flushed #53

Closed
xukai92 opened this issue Oct 3, 2019 · 8 comments
Closed

Last call of @info seems not to be flushed #53

xukai92 opened this issue Oct 3, 2019 · 8 comments

Comments

@xukai92
Copy link
Contributor

xukai92 commented Oct 3, 2019

The last call of @info seems not to be flushed. Is this tested or I did something wrong?

@PhilipVinc
Copy link
Member

Do you have an example?
It should flush after every event is serialized.

It's not tested, though.
I should test it, that's true.

@xukai92
Copy link
Contributor Author

xukai92 commented Oct 4, 2019

The main codes are

@showprogress "Distilling" for i in 1:n_lessons
        s = score(knowledge)
        gs = Tracker.gradient(() -> s, ps)
        Tracker.update!(opt, ps, gs)
        @info "train" score=Flux.data(s)
    end
    
acc = mean(onecold(ds.student(get_Z(ds, knowledge))) .== onecold(get_probability(knowledge)))
@info "train" finish_msg="Distillation with $acc towards knowledge." log_step_increment=0

The last @info never shows in my TFBoard. Is it related to log_step_increment=0 I set?

@PhilipVinc
Copy link
Member

Hmm. I cannot reproduce this on MacOs with tensor board 1.10.0.

Could you check that it is not TensorBoard that is not refreshing for some reason?
Simply start TensorBoard after you have logged that last message. Do you see it?

Alternatively, if you checkout the branch read_serialized you can use the (un-exported) command map_events.
It's not really well documented and tested yet, but you should be able to extract the last event and see what's inside.

@PhilipVinc
Copy link
Member

PhilipVinc commented Oct 4, 2019

You could try running the following

tbl = TBLogger()
# do your stuff

events = []
TensorBoardLogger.map_events(x->push!(events,x), TensorBoardLogger.logdir(tbl))
display(last(events))
display(last(events).summary.value)

what's the output?

@xukai92
Copy link
Contributor Author

xukai92 commented Oct 4, 2019

Simply start TensorBoard after you have logged that last message. Do you see it?

In fact this works! What exactly happens here?

@PhilipVinc
Copy link
Member

Eh. I have no idea.
I have noticed that sometimes TensorBoard does not refresh (even if you push the refresh button).
I only saw it happening when you log subsequent messages with the same step.

It's possible that we do something that tensor board does not like.
But if they don't document how we should talk to TB, I can only take guesses.

@xukai92
Copy link
Contributor Author

xukai92 commented Oct 4, 2019

All right. I guess I will close this issue for now in thie case.

@xukai92 xukai92 closed this as completed Oct 4, 2019
@PhilipVinc
Copy link
Member

PhilipVinc commented Oct 4, 2019

By the way, this seems known.
Seems it was fixed in v1.15

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