-
Notifications
You must be signed in to change notification settings - Fork 32
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 Lightning-like Profiler to Keras #350
Comments
cc. @bhack |
We had a long thread at #552 Also using the standard tools it is still hard to precisely profile single |
The profiler solution on TF side is via the xprof tracing with TensorBoard, and keras has callbacks for it. Adding @rchao who is the owner of the callbacks. https://www.tensorflow.org/tensorboard/tensorboard_profiling_keras |
I've tried to use profiling plug-in from tensorboard before but tbh, I hardly felt productive to work with it. It's plug-in in tensorboard which need to install separately, but IMO keras should have more dedicated profiling tools. If we look at the lightning-profiler, it gives several options ( |
What is your proposal? Do you want to have an alternative UI for the profiler portobufs? https://github.com/tensorflow/tensorflow/tree/master/tensorflow/tsl/profiler/protobuf |
Have you seen keras-team/keras-cv#141 (comment)? |
No, haven't seen. Is it generated from tf profiler? Or, custom from? |
|
cc. @rchao |
This appears to be useful to me, but it's unclear whether there is available bandwidth on the team since it's some substantial work. Happy to check with the team and circle back in a couple of weeks. |
@rchao Do you know something about the mentioned internal tool? |
Correct, there has been experimental efforts on a profiling callback that hasn't been open sourced yet. That's one thing I'll also check with the team. |
System information.
TensorFlow version (you are using): 2.9
Are you willing to contribute it (Yes/No) : No
Describe the feature and the current behavior/state
In PyTorch-Lightning, you can identify bottlenecks in your code using Profiler API. And I've found it super useful and easy to inspect the pros and cons of the code. This API offers 3 type of inferface, namely
simple
,advance
andpytorch
. I mostly usesimple
that summarize the execution time of medium to high level training + validation + inference API. The saved log files look something as follows.I don't know, in
keras
, if we have anything like this already. By having such high-level functionality inkeras
would really great. It will help to inspect the bottleneck of dataloader, model, callbacks etc, by reporting the time and memory consumption in the system.I looked for it before, discussion.
Will this change the current api? How?
This can be considered as a Callback, I think.
Who will benefit from this feature?
The keras community. Engineers and researchers, both. Mostly engineers in production phase for code optimization.
Contributing
The text was updated successfully, but these errors were encountered: