Used isort to sort imports. Also added to the git pre-commit hook.
[python_utils.git] / ml / quick_label.py
index 1ed42966db65da792a81a802b8b5a606b55e4dcc..120ff5fe92e644d22385741d2044d8c14d006dea 100644 (file)
@@ -4,6 +4,7 @@ import glob
 import logging
 import os
 from typing import Callable, List, NamedTuple, Optional, Set
+import warnings
 
 import argparse_utils
 import config
@@ -90,9 +91,9 @@ def label(in_spec: InputSpec) -> None:
             continue
         features = in_spec.image_file_to_features_file(image)
         if features is None or not os.path.exists(features):
-            logger.warning(
-                f'File {image} yielded file {features} which does not exist, SKIPPING.'
-            )
+            msg = f'File {image} yielded file {features} which does not exist, SKIPPING.'
+            logger.warning(msg)
+            warnings.warn(msg)
             continue
 
         # Render features and image.