Skip to content
This repository has been archived by the owner on Jun 26, 2021. It is now read-only.

New logging #139

Merged
merged 41 commits into from
Jul 27, 2019
Merged

New logging #139

merged 41 commits into from
Jul 27, 2019

Conversation

justusschock
Copy link
Member

First attempt for new logging structure (independent of trixi)

@justusschock
Copy link
Member Author

A review on this would be nice, since tests are passing now and we can't proceed in many other things without a new logging ;)

@justusschock justusschock changed the title WIP: New logging New logging Jun 21, 2019
@justusschock justusschock requested review from mibaumgartner and haarburger and removed request for haarburger and mibaumgartner June 21, 2019 13:39
@justusschock
Copy link
Member Author

justusschock commented Jun 27, 2019

@gedoensmax Tested this and verified it works,

I'd like to get a review here to move on with other PRs
@mibaumgartner @haarburger

@justusschock justusschock removed the request for review from mibaumgartner July 19, 2019 10:18
@ORippler
Copy link
Collaborator

ORippler commented Jul 25, 2019

Regarding your first point: this came to provide an API with only very few breaking changes from old loggings and to support both, the native visdom and tensorboard keywords, but we can reduce this.

I'll address the second point tomorrow.

Any alternatives for Multiprocessing? I tried threading, but it didn't work properly, and we shouldn't do the logging and computation on the main thread/process.

I don't know how (yet) how to parse the logfiles, but if I got some time, I'll have a look at this or can you make some time for it?

I think we should deprecate old logging keys used by trixi and remove them later on in favor of only the visdom and tensorbaord keywords.

👍

Multiprocessing is fine, we should just make the Users aware of the requirement.

I would rather review #102 and afterwards start working on #165 and/or #143 , but I will see if I can make some time.

@justusschock
Copy link
Member Author

That's fine, I'll focus on this PR then.

@justusschock
Copy link
Member Author

So I added docstrings, deprecated the keys as discussed and the only thing missing here is the check inside the tests

@justusschock
Copy link
Member Author

justusschock commented Jul 25, 2019

So, I added some basic checks for written tags, there are a few problems though:

  • we cannot check for tags always -> For example there is no tag while logging graphs
  • With Additional backends #102 the tests are split between several backends and we can only do this, if tensorflow is present, which is why we won't be able to check it for pytorch tensors (and other future tensor types)

@justusschock
Copy link
Member Author

So, there are Problems with 2 logging functionalities:

  • Logging multiple Scalars at once, which creates separate subdirs with event files
  • Logging Text

The issue with multiple scalars could be solved, by simply iterating over the scalar dict and logging them sequentially, which is not that beautiful but should

@ORippler
Copy link
Collaborator

ORippler commented Jul 26, 2019

Docstrings look fine!

Fixed the text logging: in tensorbaordX, the tag is altered, so we have to consider that in the unit test. Or you mean sth. else?

Logging multiple values at once I think iteration and sequential logging is fine even if not beautiful. If that problem only applies to TensorboardXWriter, we can also only change it there

With the graphs it's unfortunate but i can't think of an easy proper solution right now.

Same goes for testing.

@justusschock
Copy link
Member Author

No, that's exactly what I was talking about.

I changed this in the tensorboard backend and the corresponding tests.
Anything left to do?

@ORippler
Copy link
Collaborator

2 Tests for the scalars are seemingly still failing.

Otherwise, except for the removal of trixi and trixi-slim in the requirements it seems good to go!

@justusschock
Copy link
Member Author

justusschock commented Jul 26, 2019

Yeah, I messed up during test changing. Fixed this now...

Regarding the removal of trixi and trixi-slim: We cannot do this (yet). We are still building upon some of trixi's modules. Mainly the LookupConfig is just an extension of trixi's config. But I think, we may just copy that part from them (and give the sublicense there)

EDIT: I'd like to do this in a separate PR, as this one is already huge enough.
If you approve this PR, I'll merge this right after the new bugfix release and work on the new PR to finally remove trixi

@justusschock justusschock mentioned this pull request Jul 26, 2019
@justusschock justusschock merged commit 5869cfc into master Jul 27, 2019
@justusschock justusschock deleted the new_logging branch July 27, 2019 08:17
@mibaumgartner mibaumgartner mentioned this pull request Sep 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants