Untitled
unknown
plain_text
5 months ago
4.8 kB
5
Indexable
TESTING_queud_accounts No usage data to process or not a real-time run. queued_accounts Length 1 testing Calibration starts for 1 queued accounts daily 50 batch retrieval = 9.78884674699998 Daily account (1799078, 45223): index -1 is out of bounds for axis 0 with size 0 Traceback (most recent call last): File "/tmp/ipykernel_4621/4220528967.py", line 155, in calibrate y = DailyReadRegression._check_data_quality(y) File "/tmp/ipykernel_4621/2627236383.py", line 304, in _check_data_quality data_copy = DailyReadRegression._last_streak_position(data, params) File "/tmp/ipykernel_4621/2627236383.py", line 175, in _last_streak_position dates_streaks = [positions(x) for x in bads_streaks_positions] File "/tmp/ipykernel_4621/2627236383.py", line 175, in <listcomp> dates_streaks = [positions(x) for x in bads_streaks_positions] File "/tmp/ipykernel_4621/2627236383.py", line 170, in positions start = np.cumsum(list(map(len, bads_split[:i])))[-1] IndexError: index -1 is out of bounds for axis 0 with size 0 --------------------------------------------------------------------------- IndexError Traceback (most recent call last) Cell In[745], line 155, in calibrate(end_date, start_date, final_date, base_thresh, test_percent, b_size, accountids, acct_number_list, calibrate_all, forecast_and_write, do_monthly, do_hu_sales, push_back_start_for_monthly, prefer_daily, cross_validation, bias_correction, bias_threshold, trend, file_name_for_ids_save, refresh_weather, purge_models_metrics_db, weather_refresh_period, keep_historical, erase_weather_norm, erase_short_term, erase_backcast, erase_daily, id_station_mapping, short_term_flag) 153 # Quality check, needs to be modified to allow less then years of data. 154 # In general these function needs to be reviewed. --> 155 y = DailyReadRegression._check_data_quality(y) 156 directive = y[0] Cell In[725], line 304, in DailyReadRegression._check_data_quality(data) 303 try_monthly = try_monthly | (len(gaps_last_year) > params.max_day_gaps_per_year) --> 304 data_copy = DailyReadRegression._last_streak_position(data, params) 306 if data_copy.empty: Cell In[725], line 175, in DailyReadRegression._last_streak_position(data, params, streak_check) 174 # slicing the dates where the bads streaks sit --> 175 dates_streaks = [positions(x) for x in bads_streaks_positions] 176 dates = data.index Cell In[725], line 175, in <listcomp>(.0) 174 # slicing the dates where the bads streaks sit --> 175 dates_streaks = [positions(x) for x in bads_streaks_positions] 176 dates = data.index Cell In[725], line 170, in DailyReadRegression._last_streak_position.<locals>.positions(i) 169 def positions(i): --> 170 start = np.cumsum(list(map(len, bads_split[:i])))[-1] 171 end = start + len(bads_split[i]) - 1 IndexError: index -1 is out of bounds for axis 0 with size 0 During handling of the above exception, another exception occurred: UnboundLocalError Traceback (most recent call last) Cell In[763], line 58 55 telemetry_client.track_event("Calibration starts for " + str(len(queued_accounts_to_work)) + " queued accounts", {'Status': 'Success'}) 57 if len(queued_accounts_to_work) > 0: ---> 58 calibrate(accountids=queued_accounts_to_work, start_date=start_date, \ 59 end_date=end_date, final_date=end_date, 60 do_monthly=True, cross_validation=False, 61 forecast_and_write=True, base_thresh=1, trend=False, purge_models_metrics_db=True, 62 keep_historical=None, id_station_mapping=id_station_mapping) 63 else: 64 print("No accounts queued for Calibration") Cell In[745], line 260, in calibrate(end_date, start_date, final_date, base_thresh, test_percent, b_size, accountids, acct_number_list, calibrate_all, forecast_and_write, do_monthly, do_hu_sales, push_back_start_for_monthly, prefer_daily, cross_validation, bias_correction, bias_threshold, trend, file_name_for_ids_save, refresh_weather, purge_models_metrics_db, weather_refresh_period, keep_historical, erase_weather_norm, erase_short_term, erase_backcast, erase_daily, id_station_mapping, short_term_flag) 258 error_daily_dict = update_err_daily_dict(error_daily_dict, i, err_entry) 259 telemetry_client.track_exception(*sys.exc_info()) --> 260 telemetry_client.track_event('DailyModelFailure', {'Status': 'Failure', 'Error': str(err)}) 261 m_list.append(i) 263 # Doing monthly forecast if required UnboundLocalError: local variable 'err' referenced before assignment
Editor is loading...
Leave a Comment