import sys
from types import SimpleNamespace
from typing import Any, List, NamedTuple, Optional, Set, Tuple
+import warnings
import numpy as np
from sklearn.model_selection import train_test_split # type:ignore
if self.spec.delete_bad_inputs:
msg = f"WARNING: {filename}: missing features or label; expected {self.spec.feature_count} but saw {len(x)}. DELETING."
- print(msg, file=sys.stderr)
logger.warning(msg)
+ warnings.warn(msg)
os.remove(filename)
else:
msg = f"WARNING: {filename}: missing features or label; expected {self.spec.feature_count} but saw {len(x)}. Skipping."
- print(msg, file=sys.stderr)
logger.warning(msg)
+ warnings.warn(msg)
return (X, y)
def make_progress_graph(self) -> None: