Imp3rtinence commited on
Commit
2899128
·
1 Parent(s): 63d24c3

fix: remove .dt accessor from DatetimeIndex in kronos.py

Browse files
Files changed (1) hide show
  1. model/kronos.py +5 -5
model/kronos.py CHANGED
@@ -471,11 +471,11 @@ def auto_regressive_inference(tokenizer, model, x, x_stamp, y_stamp, max_context
471
 
472
  def calc_time_stamps(x_timestamp):
473
  time_df = pd.DataFrame()
474
- time_df['minute'] = x_timestamp.dt.minute
475
- time_df['hour'] = x_timestamp.dt.hour
476
- time_df['weekday'] = x_timestamp.dt.weekday
477
- time_df['day'] = x_timestamp.dt.day
478
- time_df['month'] = x_timestamp.dt.month
479
  return time_df
480
 
481
 
 
471
 
472
  def calc_time_stamps(x_timestamp):
473
  time_df = pd.DataFrame()
474
+ time_df['minute'] = x_timestamp.minute
475
+ time_df['hour'] = x_timestamp.hour
476
+ time_df['weekday'] = x_timestamp.weekday
477
+ time_df['day'] = x_timestamp.day
478
+ time_df['month'] = x_timestamp.month
479
  return time_df
480
 
481