3. Building a
model
Building
a model
Data ingestion Data analysis
Data
transformation
Data validation Data splitting
Trainer
Model
validation
Training
at scale
LoggingRoll-out Serving Monitoring
15. mlflow.set_tracking_uri(). [remote tracking URIs]
Local file path (specified as file:/my/local/dir)
Database encoded as
<dialect>+<driver>://<username>:<password>@<host>:<port>/<d
atabase
MLFlow tracking server (specified as https://my-server:5000
Databricks workspace (specified as databricks or as
databricks://<profileName>e.
16. Framework Metrics Parameters Tags Artifacts
Keras
Training loss; validation
loss; user-specified
metrics
Number of layers;
optimizer name;
learning rate;
epsilon
Model
summary
MLflow Model (Keras
model), TensorBoard logs; on
training end
tf.keras
Training loss; validation
loss; user-specified
metrics
Number of layers;
optimizer name;
learning rate;
epsilon
Model
summary
MLflow Model (Keras
model), TensorBoard logs; on
training end
tf.estimator TensorBoard metrics – –
MLflow Model (TF saved
model); on call
to tf.estimator.export_saved_
model
TensorFlow
Core
All tf.summary.scalar cal
ls
– – –
35. Create Experiment
List Experiments
Get Experiment
Delete Experiment
Restore Experiment
Update Experiment
Create Run
Delete Run
Restore Run
Get Run
Log Metric
Log Batch
Set Experiment Tag
Set Tag
Delete Tag
Log Param
Get Metric History
Search Runs
List Artifacts
Update Run
Data Structures
44. Use tempfile.TemporaryDirectory + mlflow.log_artifacts
To upload artifices
with TemporaryDirectory(prefix='temp_arti_', dir='temp_artifacts') as dirname:
……
(create artifcats )
……..
mlflow.log_artifacts(dirname)
45. Train model Validate
model
Deploy
model
Monitor
model
Retrain model
Model reproducibility Model retrainingModel deploymentModel validation
Build appCollaborate Test app Release app Monitor app
ML DevOps integration
App developer
using DevOps Services
Data scientist using
Machine Learning
46.
47.
48. A M L & M L F L O W M O D E L S
The mlflow.azureml module can export python_function models as Azure ML compatible models.
It can also be used to directly deploy and serve models on Azure ML, provided the environment has been correctly
set up.
▪ export the model in Azure ML-compatible format. MLflow will output a directory with the dependencies
necessary to deploy the model.
▪ deploy deploys the model directly to Azure ML.
You first need to set up your environment to work with the Azure ML CLI.
You also have to set up all accounts required to run and deploy on Azure ML. Where the model is deployed is
dependent on your active Azure ML environment. If the active environment is set up for local deployment, the
model will be deployed locally in a Docker container (Docker is required).
mlflow.azureml.build_image(model_path, workspace, run_id=None,image_name=None,
model_name=None,mlflow_home=None, description=None, tags=None, synchronous=True)
49. ▪ Experiment Tracking
▪ MLflow lets you run experiments with any ML library, framework, or language, and automatically keeps track of
parameters, results, code, and data from each experiment so that you can compare results and find the best
performing runs.
▪ With Managed MLflow on Databricks, you can now track, share, visualize, and manage experiments securely from
within the Databricks Workspace and notebooks.
▪ Reproducible Projects
▪ MLflow lets you package projects with a standard format that integrates with Git and Anaconda and capture
dependencies like libraries, parameters, and data.
▪ With Managed MLflow on Databricks, now you can quickly launch reproducible runs remotely from your laptop as a
Databricks job.
▪ Productionize models faster
▪ MLflow lets you quickly deploy production models for batch inference on Apache SparkTM, or as REST APIs using
built-in integration with Docker containers, Azure ML, or Amazon SageMaker.
▪ With Managed MLflow on Databricks, now you can operationalize and monitor production models using Databricks
Jobs Scheduler and auto-managed Clusters to scale as needed based on business needs.
50. A M L & D A T A B R I C K S
Choose only one option
Easily install the AML Python SDK in the
Azure Databricks clusters and use it for:
✓ logging training run metrics
✓ containerize Spark ML models
✓ deploy them into ACI or AKS