Chapter 3. Creating a workbench and using notebooks


3.1. Creating a workbench

A workbench is an instance of your development and experimentation environment. When you create a workbench, you select a workbench image that has the tools and libraries that you need for developing models.

Prerequisites

  • You created a My Storage connection as described in Storing data with connections.
  • If you intend to complete the pipelines section of this tutorial, you configured a pipeline server as described in Enabling AI pipelines.
  • If you intend to complete the Distributing training jobs with the Training Operator section of this tutorial, you completed the procedure described in Setting up Kueue resources.

Procedure

  1. Navigate to the project detail page for the project that you created in Setting up your project.
  2. Click the Workbenches tab, and then click the Create workbench button.

    Create workbench button
  3. Enter the name and description.

    Workbench name and description

    Red Hat provides several supported workbench images. In the Workbench image section, you can select one of the default images or a custom image that an administrator has set up for you. The Tensorflow image has the libraries needed for this tutorial.

  4. Select the latest Tensorflow image.

    Workbench image
  5. Under the Deployment size section, for Hardware profile, select default-profile.
  6. Keep the default environment variables and storage options.

    Workbench storage
  7. For Connections, click Attach existing connection.
  8. Select My Storage (the object storage that you configured earlier) and then click Attach.

    Connection form
  9. Click Create workbench.

Verification

In the Workbenches tab for the project, the status of the workbench changes from Starting to Running.

Workbench list
Note

If you made a mistake, you can edit the workbench to make changes.

Workbench list edit

The JupyterLab environment is web-based, but all operations run on Red Hat OpenShift AI and are backed by the OpenShift cluster. This configuration allows you to run notebooks without installing local tools or consuming local CPU, GPU, or memory resources.

Prerequisites

You created a workbench, as described in Creating a workbench and selecting a workbench image.

Procedure

  1. In the Workbenches tab for your project, click the link for your workbench. If prompted, log in and allow JupyterLab to authorize your user.

    Open workbench

    Your JupyterLab environment window opens.

    This file-browser window shows the files and folders that are saved inside your own personal space in OpenShift AI.

  2. Bring the content of this tutorial inside your JupyterLab environment:

    1. On the toolbar, click the Git Clone icon:

      Git Clone icon
    2. Enter the following tutorial Git https URL:

      https://github.com/rh-aiservices-bu/fraud-detection.git
      Copy to Clipboard Toggle word wrap
      Git Modal
    3. Select the Include submodules option, and then click Clone.
    4. In the file browser, double-click the newly-created fraud-detection folder to expand its contents.

      Jupyter file browser
    5. In the left navigation bar, click the Git icon, and then click Current Branch to expand the branches and tags selector panel.

      1. On the Branches tab, in the Filter field, enter v3.2.

        Git Clone icon
    6. Select origin/v3.2.

      The current branch changes to v3.2.

Verification

  1. In the left navigation bar, click the file browser icon to view the notebooks that you cloned from Git.

    Jupyter file browser - fraud-detection
  2. Verify that the Git version at the bottom of the JupyterLab window is v3.2.

or

Training a model

3.3. Running code in a notebook

Note

If you’re already at ease with Jupyter, you can skip to the next section.

A notebook is an environment where you have cells that can display formatted text or code.

This is an empty cell:

Jupyter Cell

This is a cell with some code:

Jupyter Cell Code

Code cells contain Python code that you can run interactively. You can edit the code and then run it. The code does not run on your computer or in the browser, but directly in your connected environment, Red Hat OpenShift AI in your case.

You can run a code cell from the notebook interface or from the keyboard:

  • From the user interface: Select the cell (by clicking inside the cell or to the left side of the cell) and then click Run from the toolbar.

    Jupyter Run
  • From the keyboard: Press CTRL + ENTER to run a cell or press SHIFT + ENTER to run the cell and automatically select the next one.

After you run a cell, you can see the result of its code and information about when the code in the cell ran, as shown in this example:

Jupyter run cell

When you save a notebook, the code and the results are saved. You can reopen the notebook to view the results without having to run the program again, and still having access to the code.

Notebooks are so named because they are like a physical notebook: you can take notes about your experiments, along with the code itself, including any parameters that you set. You can see the output of the experiment inline (this is the result after a cell runs), along with all the notes that you want to take. To take notes, from the menu switch the cell type from Code to Markdown.

Prerequisites

Procedure

  1. In your JupyterLab environment, locate the 0_sandbox.ipynb file and double-click it to launch the notebook. The notebook opens in a new tab in the content section of the environment.

    Notebook 0
  2. Experiment by, for example, running the existing cells, adding more cells and creating functions.

    You can do what you want - it is your environment and there is no risk of breaking anything or impacting other users. This environment isolation is also a great advantage brought by OpenShift AI.

  3. Optionally, create a new notebook in which the code cells are run by using a Python 3 kernel:

    1. Create a new notebook by either selecting File →New →Notebook or by clicking the Python 3 tile in the Notebook section of the launcher window:

      New notebook

      You can use different kernels, with different languages or versions, to run in your notebook.

Additional resources

Next step

Training a model

3.4. Training a model

In your notebook environment, open the 1_experiment_train.ipynb file and follow the instructions directly in the notebook. The instructions guide you through some simple data exploration, experimentation, and model training tasks.

Jupyter Notebook 1

When you save the model, you convert the model to the portable Open Neural Network Exchange (ONNX) format. By using ONNX, you can transfer models between frameworks with minimal preparation and without the need for rewriting the models.

Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust. Explore our recent updates.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Theme

© 2026 Red Hat
Back to top