Skip to content

Commit

Permalink
do not enforce datetype
Browse files Browse the repository at this point in the history
  • Loading branch information
wgifford committed Nov 12, 2024
1 parent 66a76f9 commit b5448a4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tsfm_public/toolkit/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ def __init__(

# sort the data by datetime
if timestamp_column in list(data_df.columns):
if not isinstance(data_df[timestamp_column].iloc[0], pd.Timestamp):
data_df[timestamp_column] = pd.to_datetime(data_df[timestamp_column])
# if not isinstance(data_df[timestamp_column].iloc[0], pd.Timestamp):
# data_df[timestamp_column] = pd.to_datetime(data_df[timestamp_column])
data_df = data_df.sort_values(timestamp_column, ignore_index=True)

# pad zero to the data_df if the len is shorter than seq_len+pred_len
Expand Down

0 comments on commit b5448a4

Please sign in to comment.