From the course: Full-Stack Deep Learning with Python
Unlock this course with a free trial
Join today to access over 25,300 courses taught by industry experts.
Training a model within an MLflow run - Python Tutorial
From the course: Full-Stack Deep Learning with Python
Training a model within an MLflow run
With our model configured, now it's time for us to train the model and track the metrics, parameters, and artifacts of this model using MLflow. Notice the imports on lines 1, 2, and 3. These are imports that have to do with logging all of the details of the model, including the model signature, the schema, and tensor specifications of the tensors that we feed into the model. I instantiate the model on line 5, that is our EMNIST model. And on line seven, I instantiate the CSV logger. The CSV logger is what we'll use to log out details of the training process to our local machine. The actual training process will be run using the PyTorch Lightning Trainer that I instantiate on line nine. We'll train for a maximum of 10 epochs. And notice I pass in the CSV logger as an input argument so that the trainer can use that logger to log out details during training. Now, MLflow can track parameters and metrics in a very granular and manual fashion by calling log metrics, log params, as you saw…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
(Locked)
Loading and exploring the EMNIST dataset5m 29s
-
(Locked)
Logging metrics parameters and artifacts in MLflow7m 38s
-
(Locked)
Set up the dataset and data loader3m 58s
-
(Locked)
Configuring the image classification DNN model5m 3s
-
(Locked)
Training a model within an MLflow run4m 9s
-
(Locked)
Exploring parameters and metrics in MLflow5m 15s
-
(Locked)
Making predictions using MLflow artifacts5m 41s
-
(Locked)
Preparing data for image classification using CNN4m 9s
-
(Locked)
Configuring and training the model using MLflow runs6m 26s
-
(Locked)
Visualizing charts metrics and parameters on MLflow7m 7s
-
(Locked)
-
-
-