"Classifying Images with a Linear Model" lab requires graphviz Debian package install before any GUI steps
MrCsabaToth opened this issue · comments
The 10th code cell would display the linear NN model's graph.
tf.keras.utils.plot_model(model, show_shapes=True, show_layer_names=False)
That fails with
('You must install pydot (
pip install pydot) and install graphviz (see instructions at https://graphviz.gitlab.io/download/) ', 'for plot_model/model_to_dot to work.')
However !pip install pydot graphviz
reveals that those python packages are installed in the notebook's python venv. However the underlying jupyter notebook's VM doesn't have the graphviz
Debian package installed.
Trying sudo apt install graphviz
failed because the GUI had apt locked. So this step should be done possibly right after the repo cloning, or even before that.
Not 100% sure how to craft a PR for this because this extra step should be part of the Lab instructions and not the ipynb. The lab cannot be completed BTW because the last checkpoint never succeeds even though I went through the notebook two times. I'd wonder what is ti checking for. The notebook in its current form displays images and graphs in the notebook, doesn't explicitly export or save models or files.
Could be even an issue with the next lab in the series which is https://github.com/GoogleCloudPlatform/training-data-analyst/blob/master/courses/machine_learning/deepdive2/computer_vision_fun/labs/classifying_images_with_a_nn_and_dnn_model.ipynb which also has a plot_model
instruction.
I searched in the repo and many dozen ipynbs use plot_model, so I wonder how wide spread this issue is.
With #2455 and lately with other labs I was able to install apt
packages and didn't run into an apt
lock, so maybe we could add a !sudo apt install graphviz
as the first instruction of the notebook?