diff options
| author | Scott <[email protected]> | 2022-01-11 13:33:24 -0800 |
|---|---|---|
| committer | Scott <[email protected]> | 2022-01-11 13:33:24 -0800 |
| commit | b454ad295eb3024a238d32bf2aef1ebc3c496b44 (patch) | |
| tree | 89368a7cdad571da9e2c7297190fdce48eb3feb9 /ml/quick_label.py | |
| parent | d2478310649d51e14f8ece57651ca9d925d98793 (diff) | |
Start using warnings from stdlib.
Diffstat (limited to 'ml/quick_label.py')
| -rw-r--r-- | ml/quick_label.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ml/quick_label.py b/ml/quick_label.py index 1ed4296..120ff5f 100644 --- a/ml/quick_label.py +++ b/ml/quick_label.py @@ -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. |
