Skip to content

Commit

Permalink
Merge pull request #197 from ibm-granite/toolkit_fixes
Browse files Browse the repository at this point in the history
do not enforce datetype
  • Loading branch information
wgifford authored Nov 12, 2024
2 parents 66a76f9 + b5448a4 commit f46398e
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 f46398e

Please sign in to comment.