diff --git a/python/pyspark/ml/util.py b/python/pyspark/ml/util.py
index <HASH>..<HASH> 100644
--- a/python/pyspark/ml/util.py
+++ b/python/pyspark/ml/util.py
@@ -17,6 +17,7 @@
 
 import sys
 import uuid
+import warnings
 
 if sys.version > '3':
     basestring = str
[SPARK-<I>][ML][PYTHON] Import warnings in pyspark.ml.util

## What changes were proposed in this pull request?

Add missing `warnings` import.

## How was this patch tested?

Manual tests.