Skip to content

Example: Flood Model Training⚓︎

Practical Case: Training a flood detection model.

Context⚓︎

We want to be able to train our Flood Model using the MLOps platform.

The repositories are on the develop cluster GitLab. They are mirrored in the following repositories:

Scenario (ML Developer)⚓︎

Step 1: Browsing SharingHub for the model⚓︎

Step 2: Clone the model⚓︎

Step 3: Model setup⚓︎

  • Install poetry environment
  • Setup .env file: credentials for mlflow

Step 4: Dataset setup⚓︎

Step 5: Train Model⚓︎

  • Run training session.
  • Check metrics in mlflow UI.
  • Show modes streaming and no cache.

Step 6: Inference⚓︎

  • Run an inference with a tif file 512x512: Pakistan_43105_S1Hand.tif and import the model from .onnx file.
  • Show the result stored in predictions/prediction.tif file.

Step 7: Packaging⚓︎

Docker for training⚓︎

  • Build the docker image for training.
  • Run this image in a docker container.

Docker for inference⚓︎

  • Build the docker image for inference and specify the onnx file to use 1 time.
  • Run this image with a tif file 512x512: Pakistan_43105_S1Hand.tif as an input.

Scenario (ML User)⚓︎

CWL for inference⚓︎

  • Download the onnx from the sharinghub
  • Run the cwl file with cwltool. Parameters are saved in run_inference_input.yml file.