-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
AdvancedProfiler error #1236
Comments
Hi @dumitrescustefan thanks for submitting this issue.
If there are other Github Issues please reference them here
Did you configure logging? I usually do this in the root eg.
Finally, this seems unrelated to the AdvancedProfiler.
Can you show what your |
btw I have value error but not in profiler. I was using loguru instead of logging. |
@jeremyjordan thanks for the tips! I put logging into init.py, and tried with the "basic" profiler again, now I get the same error. Here are the train/val_steps:
All the code (except the forward and the model params) is copy-pasted from a lightning tutorial. Without the profiler everything seems to work okay. The trainer is initialised with:
IMHO, shouldn't the profiler be agnostic to what I do in the code? Actually the in-built profiler is one of the main features that made me try out Lightning. I would be most grateful to have it work :) Please tell me what piece of code I could provide. The model itself aims at predicting a set of n values (floats) based on a number of sentences (embedded with BPE as ints). There is a sentence-level RNN that encodes each sentence, and then a "document" level RNN that runs over each sentence. This gets into a hidden->n linear layer and the error is MSELoss(). This is a baseline I created and I'd like to build from here, but I need to get past these initial errors. I don't know if this info is useful for you, I can provide all the code if required. Thanks! |
My bad. I did 2 things, I added the profiler and then I also added reduction='none' (in I'm not closing this issue because even though now the AdvancedProfiler works (dumps to a file), the basic one still doesn't want to print anything onscreen, even after adding level=DEBUG. If logging is required, maybe the docs could be updated ( https://pytorch-lightning.readthedocs.io/en/latest/profiler.html ). Should I do anything more besides adding logging to init?
and in the Trainer object:
Thanks! Thanks and sorry for the time taken on my mistake! |
yes! that's why i was confused about your error :)
but this makes perfect sense
that's great to hear! definitely want to help you get this figured out. i tried reproducing your error but it's working for me - check out this colab notebook could you perhaps share a colab notebook where this is failing? btw i agree we should add a note to the documentation about enabling the logger, i believe we used to configure logging within the library but that was removed at one point |
similar question about missing logging table was raised also by @dumitrescustefan
|
If (2) is true, then let’s just make a limit of 2 epochs when profiler is enabled? Another option is to always run the basic profiler for the sanity check. Then profiler=True would run it for training as well. but i think the sanity check profiler won’t reflect the true speed bc it doesn’t backprop? @jeremyjordan can we prioritize making these fixes as this is a key feature? |
at the time when the feature was merged, we were configuring logging. i went back to the branch and verified that it was working out of the box. there was a later PR (#767) which removed this.
actually, we still do show it :) in both cases (early stopping + keyboard interrupt)
yeah for sure. as i understand, this should just involve adding the logging config back in |
Hi, as others have pointed out, the Profiler doesn't seem to work (it prints nothing), and trying out the AdvancedProfiler as in https://pytorch-lightning.readthedocs.io/en/latest/profiler.html like:
gives me the following error:
Any pointers?
My env: torch 1.4 installed with pip, Python 3.7, no GPU, on, MacOS.
Thanks for the great lib you're developing!
The text was updated successfully, but these errors were encountered: