-
Notifications
You must be signed in to change notification settings - Fork 27
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
Implement AbstractLogger interface #9
Conversation
This comment has been minimized.
This comment has been minimized.
I have not reviewed this yet, I will try and find time to in the next few days if you would like another set of eyes over it. It might also be good if @c42f could take a look |
Please do! I would really appreciate a pair (or two) of more experienced eyes on this. |
This one is interesting! As you can probably see, using Some high level questions, keeping in mind that I haven't had time to read up on what tensorboard can do or experiment with it:
The system as a whole needs to map structured log events into something which will be styled and presented via the tensorboard UI. Log events generated with |
Dispatch on the type of the thing being logged.
|
Kinda-yes. Tensorboard essentially takes tags and data. Right now when a message is logged I generate the tag by combining the
If we implement a |
What to do with complex messages is unclear to me also. should open another issue to discuss that. Or work it out when we get up to it. |
Ok thanks. It sounds like tensorboard actually has quite a good match of concepts with the logging system. That's fortunate!
Cool I think this is the right thing and will lead to reasonable defaults. It's pretty much the same conclusion I came to with |
Add a few docstrings Remove Coveralls
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
automatic dispatch of logger functions using summary_impl
is very elegant but there will be ambiguity when we implement log_image
since both log_image
and log_histogram
should be able to take 2-D or 3-D arrays. So users should have the freedom to specify which logger they want to use when logging certain object. When user does not specify any particular logger, then defaults can be used.
- preprocess now calls itself recursively and only pushes to a list if the type can be serialized. - Remove the `loggable` function as now it's no longer needed. - There is also no need for a stack (and the DataStructures dependency). Just use a Vector for `data` in `handle_message` - Fix the readme: `delta_step` -> `log_step_increment`
…-keyword version in the last commit )
@shashikdm Yes. That's something that we should discuss in #10. I believe we can always define some wrapper type like
and use this to propagate the fact that we want to serialize such data as an image. If the default behavior is defined in |
@oxinabox Any additional comments? Looks fine by you? |
I suggest the right way to fix this is a wrapper type for arrays which tells the logging backend of the semantic of the array. For example, just present normal 2D arrays as images; if you want a histogram as presentation I think this implies you're interpreting the array as samples from some distribution, and you should wrap the array appropriately in a As a very rough illustration:
Then you encode the interpretation of |
Don't wait for me before merging, I think this is good to get started with and can always change as problems occur? |
Implements the logging interface.
Can break down arbitrary structs #5 into elementary blocks.
This also exposes an API to allow other packages to edit how TensorBoardLogger logs custom types.
To change how a custom type is logged,
preprocess(name::String, value::CustomType, data)
should be defined, pushing todata
name-value pairs of objects that should be logged. For example, complex numbers are internally handled by the followingpreprocess
function:If someone has a better idea for how to implement this interface, please feel free to share.