Model training in Jupyter Code Workspaces example, install it and make it work.

I have recently started working with Machine Learning models on Foundry. To learn how to do it I started installing Model training in Jupyter Code Workspaces example. This is a great starting point as it is a really complete example, but it wasn’t so easy to make it work out-of-the-box. In this post I won’t get into the details of the notebook itself as it is thoroughly explained in its text, but I will tell you things I have done to make it work that are not explained in the notebook.

I started by installing the example in a new directory inside an existing project. And trying to run it out-of-the-box with the “Run All Cells” button. The issues I encountered are the following:

  1. No kernel available: Dependencies installation fail silently and all you see is that you don’t have a kernel available to run the notebook. In the notebook you can see a list of libraries you should check that are installed but none of them is the one that is causing this issue.
    Solution: install the latest version of ipykernel library and refresh page. Then you’ll see a python kernel available.

  2. Other dependencies failing to install: This may also happen to you with other libraries that are not included in the dependencies written in the notebook. The complete list of dependencies is:

  - palantir_models
  - numpy
  - foundry-transforms-lib-python>=0.769.0
  - scikit-learn>=1.5.2
  - matplotlib
  - ipykernel
  - palantir_models_serializers
  - pandas
  - pip

You may need to restart workspace after installing libraries

  1. Access not granted for AIP Now Ontology: The ontology is automatically installed as a dependency with the rest of the installation. However, when trying to map the Flights dataset it wasn’t able to access.
    Solution: Reinstall AIP Now Ontology unchecking the Automatic Upgrades.

  2. This is not an issue but a caveat. When mapping the flights dataset or saving the model object or saving the output dataset you’ll be interacting with objects that are not always saved by default in the same project. You should be careful to save it anywhere accessible from the project you have your notebook.

How did it go for you? Have you found other errors during installation?

4 Likes