I have bumped into an initially innoncent issue, that spiralled into an actual problem that I have yet to solve. To put it simply, none of my instances I have deployed in Vertex AI Workbench are currently capable of displaying any plots/graphs inside Jupyter notebooks that run on them.
I did try it with different kernel versions (M135, M130, M131), did try restarting kernel, recreating the environments. I also tried testing it in different web browser (Chrome and Edge). The result is that anytime I try to visualise a graph/plot created with Matplotlib/Seaborn, an empty field is returned, instead of the visualisation.
The same script works without any issues in my local IDE, visualising the graphs/plots I have created. I did try adding %matplotlib inline or tried suggestions I found regarding this issue in general. However, it does seem to be very much limited to only Vertex AI Workbench instances - no issues with the code in local IDE or other context.
Furthermore, any time I open the notebook, I can see that the graphs are visible for just a second, only to disappear. Which suggests that the Python code execution works fine, it is just that a bug is supressing actual visualisation of the output (graph/plot) in the cell.
I would be thankful for any tips and suggestions. Currently, I feel like I stumbled upon a bug and have no idea how to solve it. Again, anywhere outside the Workbench instances the same code works just fine - it is only within this GCP service that the graphs/plots are not being visualised and return empty cell.
Same issue. When accepting to update the workbench those days (>2025-11-13), the visualization of plots is lost.
Example
%matplotlib inline
import matplotlib.pyplot as plt
import numpy as np
t = np.arange(0,1,0.01)
y = np.sin(2*np.pi*t)
plt.figure()
plt.plot(t,y)
plt.show();
Had the same issue with M135. Going back from kernel M135 to M134 did solve the issue for me. Tested both Jupyter versions (4 and 3). Jupyter version doesn’t play a role in my case.
definitely sounds like a front-end rendering bug in Vertex AI Workbench rather than an issue with your code. The fact that plots flash for a second and then disappear is a classic symptom of a JS/UI collision inside the hosted Jupyter environment.
A few things you can try that often fix this in Workbench:
1. Force the notebook to use an alternative Matplotlib backend:
import matplotlib
matplotlib.use(“Agg”) # or “module://matplotlib_inline.backend_inline”
%matplotlib inline
2. Disable JupyterLab extensions
Some Workbench builds ship with pre-installed extensions that break plot rendering. Run:
jupyter labextension list
and try disabling any suspicious ones.
3. Switch to “Classic Notebook” instead of JupyterLab
Many users reported that plots render normally there.
4. Clear the browser cache + disable ad-blockers
Some ad-blockers kill the JS layer that Matplotlib uses to display inline figures.
If none of this works, you’re likely right — it may be a regression in the latest Workbench images. In that case, file a ticket with GCP Support and pin your instance to an older image that still works.