-
Notifications
You must be signed in to change notification settings - Fork 27.6k
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
NotebookProgressCallback doesn't work in databricks notebooks properly--should either be fixed or removed from trainer automatically if it is a databricks runtime #17406
Comments
Do you know which test we could do to easily detect if we are in a |
From stackoverflow:
|
|
Could you try if the PR mentioned above does solve your problem? |
Hi, just want to add, since I experienced the same issue in the past. I believe the reason why the HTML produced by There was a guide how to set Databricks to use IPython kernel. And in my experience, when this is set, the evaluation result table produced by Most users, however, I believe will use the default setting i.e. not overriding Databricks default setting to specifically use IPython kernel. Therefore, the changes in this commit looks good. However, in the most recent Databricks runtime version 11.0, IPython kernel is now the default Python code execution engine. Therefore, the HTML produced by https://docs.microsoft.com/en-us/azure/databricks/notebooks/ipython-kernel I suggest, in addition to checking if this environment variable |
If you want to make a PR with the adjustment, I'll be happy to look at it! |
Thanks |
transformers/src/transformers/utils/notebook.py
Line 269 in 71e6027
Hey all,
Using databricks for training, the default Trainer behavior will automatically add NotebookProgressCallback for databricks notebooks, but the databricks UI currently does not display the output properly. It just prints a bunch of text saying
<IPython.core.display.HTML object>
over and over. This is likely an issue on Databricks' end, so I recommend not adding this callback if the transformers library can detect it is a databricks runtime not a jupyter/google collab notebook. I think there should also be an easier way to delete specific callbacks--it took a long time to trace this issue and reading source code to figure out what the source cause is. I am circumventing the issue for now by popping the callback from the trainer callback handlers list but that is not a good pattern.Thanks!
The text was updated successfully, but these errors were encountered: