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

A simple logger for notebooks or repl #2313

Closed
ttumiel opened this issue Jun 22, 2020 · 2 comments
Closed

A simple logger for notebooks or repl #2313

ttumiel opened this issue Jun 22, 2020 · 2 comments
Labels
feature Is an improvement or enhancement help wanted Open to be worked on

Comments

@ttumiel
Copy link

ttumiel commented Jun 22, 2020

🚀 Feature

A basic logger that can display results in a table in the repl or in a notebook as the network trains and saves the results to a csv file.

Motivation

A lightweight logger is useful for environments where you might not have port access or for interactive experimentation.

Pitch

I created a logger at this gist that does this: https://gist.github.com/ttumiel/32e6a73d206f4df55aa73d6d4ecdf0c4

Alternatives

In #1803, a CSV logger is proposed which would perform similarly except it would not display interactively. If the csv logger is implemented, a subclass could display the csv in the repl.
Furthermore, lightning doesn't depend on pandas which my implementation above uses. I could remove pandas, though, and build the csv manually.

@ttumiel ttumiel added feature Is an improvement or enhancement help wanted Open to be worked on labels Jun 22, 2020
@github-actions
Copy link
Contributor

Hi! thanks for your contribution!, great first issue!

@ttumiel
Copy link
Author

ttumiel commented Jul 1, 2020

A nice and clean alternative I found is using a callback such as the PrintTableMetricsCallback from bolt:

from pl_bolts.callbacks import PrintTableMetricsCallback
import pytorch_lightning as pl

trainer = pl.Trainer(callbacks=[PrintTableMetricsCallback()])

# loss│train_loss│val_loss│epoch
# ──────────────────────────────
# 2.2541470527648926│2.2541470527648926│2.2158432006835938│0

Since this issue is about displaying the logs in a table in the repl I'll close this. #1803 is still open though for a csv logger, which potentially could be implemented in a similar way.

@ttumiel ttumiel closed this as completed Jul 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Is an improvement or enhancement help wanted Open to be worked on
Projects
None yet
Development

No branches or pull requests

1 participant