This example takes clinical data, RNA data, and images as inputs and uses regression to train a model that will predict how long the person is expected to take to recover. The training flow is:
- Preprocess the clinical data and images
- Split the training data into training, validation, and test datasets
- Train the model
- Deploy the model
- Test the model with a WebApp
This example provides a fully automated way to train and deploy the model.
The Code Repo contains the program code and other associated files for developing and running your model training.
- Navigate to
Codemenu on the left side of the screen - Select
+ Code- Name:
regression
Note The Code repo name must be the one above, or the example will not run
- Code Source:
Git - URL:
https://github.com/oneconvergence/dkube-examples.git - Branch:
tensorflow - Leave the other fields in their current selection and
Submit
- Name:
The clinical regression can be run in an automated manner through a Kubeflow Pipeline.
A JupterLab IDE is used to create the pipeline that trains the model.
- Navigate to
IDEsmenu on the left - Select
+ JupyterLab- Name:
<your-ide-name>(Your choice of name) - Code: Select
regression - Framework:
Tensorflow - Framework Version:
2.0.0 - Image:
ocdr/dkube-datascience-tf-cpu-multiuser:v2.0.0-17
Note The image should default to the correct selection, but you should check to ensure that it is the right one
- Leave the other fields in their current selection and
Submit
- Name:
A JupyterLab script is used to create the training pipeline.
- Navigate to
IDEsmenu on the left - When the JupyterLab instance is running, select the icon on the right to open a new JL tab
- Navigate to
workspace/regression/clinical_reg - Open
pipeline.ipynb - Select
Runmenu at the top and SelectRun All Cells - This will create the Kubeflow Pipeline to:
- Create the datasets
- Proprocess the data
- Split them in to train, validate, & test
- Train the model
- Deploy the model
- Start the inference WebApp
- The pipeline will be automatically created within DKube, and a pipeline run will be started
- Navigate to
Pipelinesmenu to view the pipeline graph and track the progress - Select
Runstab on the top - Your new pipeline run will be the first entry
- Select
View Pipelineon the Run row to see the entire pipeline - Use the backarrow to view the list of pipelines again
- Select the pipeline name to view the pipeline progress
After the pipeline has completed its execution, you can view the Runs, Datasets, and Models created. You can go to the Test Inference section to use example files with the deployed model.
One Convergence has created a simple test inference application for this example.
- From the JupyterLab tab, download the csv data file
cli_inp.csvfrom the./sample_datafolder, and any sample image from the./sample_data/imagesfolder - Navigate to the
Deploymentsmenu on the left and identify the deployment from the pipeline (it should be at the top)- Copy the
EndpointURL from that row to your clipboard using the icon
- Copy the
- In a new tab, access the WebApp at
https://<your-dkube-url>/inference(Eg.https://1.2.3.4:32222/inference) - In the WebApp, fill in the following fields:
- Paste the
EndpointURL into theModel Serving URLfield - Copy the token from the DKube
Developer Settingsmenu at the top right - Select the model type as
Regression - Select
Upload Imageand use the image file that you downloaded - Select
Upload Fileand use the csv file that you downloaded Predict
- Paste the
- The WebApp will predict how long the person will take to recover
Note You may receive a message that the WebApp has timed out. This is due to the pod starting up. Select
Wait.