AmberSJones / pyhydroqc

This software was designed with the purpose of anomaly detection and correction for time series water sensor data. This software was developed using the Logan River Observatory data set.
BSD 3-Clause "New" or "Revised" License
21 stars 12 forks source link

suppress warnings #29

Open AmberSJones opened 4 years ago

AmberSJones commented 4 years ago

there are cases where warnings in model development, etc. need to be suppressed.

tannerlex commented 3 years ago

convergence warning is suppressed after PR #67

suppression is still needed for: /home/tjones/.local/lib/python3.6/site-packages/tensorflow/python/framework/tensor_util.py:523: DeprecationWarning: tostring() is deprecated. Use tobytes() instead. tensor_proto.tensor_content = nparray.tostring() /home/tjones/.local/lib/python3.6/site-packages/tensorflow/python/framework/tensor_util.py:523: DeprecationWarning: tostring() is deprecated. Use tobytes() instead. tensor_proto.tensor_content = nparray.tostring()

I tried suppression using warning around the tensorflow call in modeling_utilities.train_model: warnings.filterwarnings('ignore', message='tostring() is deprecated') es = tf.keras.callbacks.EarlyStopping(monitor=monitor, patience=patience, mode=mode) warnings.filterwarnings('default') but it didn't work

I also tried the same around the scipy call in anomaly_utilities.set_dynamic_threshold: z = norm.ppf(1 - alpha / 2) but it didn't work either