Make Report Cronjob more robust
Obersved error:
Epoch 100/300 44/44 - 0s - loss: 0.1074 - mean_squared_error: 0.0353 - mean_absolute_error: 0.0923 - val_loss: 0.1199 - val_mean_squared_error: 0.0825 - val_mean_absolute_error: 0.1042 - 106ms/epoch - 2ms/step Traceback (most recent call last): File "/home/benjamin/bg_net/examples/goReporter.py", line 656, in main() File "/home/benjamin/bg_net/examples/goReporter.py", line 615, in main make_reports( File "/home/benjamin/bg_net/examples/goReporter.py", line 420, in make_reports report_on_channel( File "/home/benjamin/bg_net/examples/goReporter.py", line 353, in report_on_channel test_dataset_scaled = scaler_x.transform(test_dataset) File "/home/benjamin/miniconda3/envs/bgnet/lib/python3.8/site-packages/sklearn/preprocessing/_data.py", line 1550, in transform X = self._validate_data( File "/home/benjamin/miniconda3/envs/bgnet/lib/python3.8/site-packages/sklearn/base.py", line 566, in _validate_data X = check_array(X, **check_params) File "/home/benjamin/miniconda3/envs/bgnet/lib/python3.8/site-packages/sklearn/utils/validation.py", line 805, in check_array raise ValueError( ValueError: Found array with 0 sample(s) (shape=(0, 145)) while a minimum of 1 is required by RobustScaler.
The script fails because of uncaught ValueError (due to insuficient data for training one model). The error should be caught.
The logfile does not tell at which model the failure happened. This needs to be added.