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

Add a basic logger which does not require ports #1803

Closed
CharlieCheckpt opened this issue May 12, 2020 · 10 comments · Fixed by #2721
Closed

Add a basic logger which does not require ports #1803

CharlieCheckpt opened this issue May 12, 2020 · 10 comments · Fixed by #2721
Assignees
Labels
feature Is an improvement or enhancement good first issue Good for newcomers help wanted Open to be worked on

Comments

@CharlieCheckpt
Copy link

🚀 Feature

It would be great to have a basic logger that does not require opening ports.

Motivation

At this time, all loggers supported by Lightning requires to use ports. There are some environments where I don't have total control and I cannot open ports. It would be great to implement a logger that could dump the metrics during training, and easily visualize their evolution, without the need to forward a port.

Pitch

As proposed by @justusschock in the slack channel, one could add a basic logger FileLogger that saves metrics into a file (like json) and plots them on a regular basis.

Thank you for the great package !

@CharlieCheckpt CharlieCheckpt added feature Is an improvement or enhancement help wanted Open to be worked on labels May 12, 2020
@williamFalcon
Copy link
Contributor

Maybe this should just be a csv logger? because most viz libraries use CSVs?

@minimaxir
Copy link

A CSV logger is actually a good idea; the Keras CSV logger got a lot of mileage in my work.

https://keras.io/api/callbacks/csv_logger/

@github-actions
Copy link
Contributor

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

@williamFalcon
Copy link
Contributor

ok cool. Yeah, test-tube already has these ideas (in fact, v1 was just a csv logger). Maybe we can repurpose that code. Although this should be pretty simple to do.

Caveat: we don't want to use pandas for this haha.

Anyone want to submit the PR?
@minimaxir @CharlieCheckpt

@CharlieCheckpt
Copy link
Author

It will be difficult for me to do it in the following weeks, sorry @williamFalcon !

@motlikm
Copy link
Contributor

motlikm commented May 24, 2020

Hi, I would like to take this one if it is still available.

If I understand it correctly, it should be CSV logger, with simple output directory structure

  • logs/
    • exp_name/
      • exp_version/
        • hparams.csv
        • metrics.csv
        • experiment.csv

Is that right? Should there be anything else?

@justusschock
Copy link
Member

for now, we usually don't save hparams in csv any more but use yaml instead (at least in checkpointing). you could maybe have a look on whether you want to stay with csv or just use the code from checkpointing...

You might also think about saving images later on :)

@stale
Copy link

stale bot commented Jul 24, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the won't fix This will not be worked on label Jul 24, 2020
@justusschock
Copy link
Member

@xmotli02 how is it going here?

@stale stale bot removed the won't fix This will not be worked on label Jul 24, 2020
@motlikm
Copy link
Contributor

motlikm commented Jul 24, 2020

Hi, sorry I was pretty busy these last couple of weeks and then I forget a little about this issue. However, I have almost finished logger, I just need to have a look at some edge cases and add tests. I think I'll be able to find some time this weekend to finish this. I'll keep you updated.

motlikm pushed a commit to motlikm/pytorch-lightning that referenced this issue Jul 26, 2020
motlikm pushed a commit to motlikm/pytorch-lightning that referenced this issue Jul 27, 2020
motlikm pushed a commit to motlikm/pytorch-lightning that referenced this issue Jul 27, 2020
motlikm pushed a commit to motlikm/pytorch-lightning that referenced this issue Jul 27, 2020
@motlikm motlikm mentioned this issue Jul 27, 2020
7 tasks
motlikm pushed a commit to motlikm/pytorch-lightning that referenced this issue Jul 27, 2020
motlikm pushed a commit to motlikm/pytorch-lightning that referenced this issue Jul 27, 2020
motlikm pushed a commit to motlikm/pytorch-lightning that referenced this issue Jul 30, 2020
motlikm pushed a commit to motlikm/pytorch-lightning that referenced this issue Jul 30, 2020
motlikm pushed a commit to motlikm/pytorch-lightning that referenced this issue Jul 30, 2020
motlikm pushed a commit to motlikm/pytorch-lightning that referenced this issue Jul 30, 2020
motlikm pushed a commit to motlikm/pytorch-lightning that referenced this issue Jul 30, 2020
@Borda Borda added the good first issue Good for newcomers label Aug 4, 2020
Borda pushed a commit to motlikm/pytorch-lightning that referenced this issue Aug 5, 2020
Borda pushed a commit to motlikm/pytorch-lightning that referenced this issue Aug 5, 2020
Borda pushed a commit to motlikm/pytorch-lightning that referenced this issue Aug 5, 2020
Borda pushed a commit to motlikm/pytorch-lightning that referenced this issue Aug 5, 2020
Borda pushed a commit to motlikm/pytorch-lightning that referenced this issue Aug 5, 2020
Borda pushed a commit to motlikm/pytorch-lightning that referenced this issue Aug 5, 2020
Borda pushed a commit to motlikm/pytorch-lightning that referenced this issue Aug 5, 2020
Borda pushed a commit to motlikm/pytorch-lightning that referenced this issue Aug 5, 2020
Borda pushed a commit to motlikm/pytorch-lightning that referenced this issue Aug 5, 2020
Borda pushed a commit to motlikm/pytorch-lightning that referenced this issue Aug 5, 2020
Borda pushed a commit to motlikm/pytorch-lightning that referenced this issue Aug 5, 2020
Borda pushed a commit to motlikm/pytorch-lightning that referenced this issue Aug 5, 2020
Borda pushed a commit to motlikm/pytorch-lightning that referenced this issue Aug 5, 2020
Borda pushed a commit to motlikm/pytorch-lightning that referenced this issue Aug 5, 2020
Borda pushed a commit to motlikm/pytorch-lightning that referenced this issue Aug 5, 2020
Borda pushed a commit to motlikm/pytorch-lightning that referenced this issue Aug 5, 2020
Borda pushed a commit to motlikm/pytorch-lightning that referenced this issue Aug 5, 2020
Borda pushed a commit to motlikm/pytorch-lightning that referenced this issue Aug 5, 2020
Borda pushed a commit to motlikm/pytorch-lightning that referenced this issue Aug 6, 2020
Borda pushed a commit to motlikm/pytorch-lightning that referenced this issue Aug 6, 2020
Borda pushed a commit to motlikm/pytorch-lightning that referenced this issue Aug 6, 2020
Borda pushed a commit to motlikm/pytorch-lightning that referenced this issue Aug 6, 2020
Borda pushed a commit to motlikm/pytorch-lightning that referenced this issue Aug 6, 2020
Borda pushed a commit to motlikm/pytorch-lightning that referenced this issue Aug 6, 2020
williamFalcon pushed a commit that referenced this issue Aug 6, 2020
* Added basic file logger #1803

* fixup! Added basic file logger #1803

* fixup! Added basic file logger #1803

* fixup! Added basic file logger #1803

* fixup! Added basic file logger #1803

* fixup! Added basic file logger #1803

* csv

* Apply suggestions from code review

* tests

* tests

* tests

* miss

* docs

Co-authored-by: xmotli02 <[email protected]>
Co-authored-by: Jirka Borovec <[email protected]>
Co-authored-by: Jirka Borovec <[email protected]>
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 good first issue Good for newcomers help wanted Open to be worked on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants