You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Following the Tutorial (A Gentle Introduction to Anomaly Detection in Merlion, I receive the following error:
84 df = df.drop_duplicates(subset="timestamp", keep="first")
85 logger.warning(f"Time series {csv} (index {i}) has timestamp duplicates. Kept first values.")
---> 87 all_dt = np.unique(np.diff(df["timestamp"])).astype(np.int64)
88 gcd_dt = all_dt[0]
89 for dt in all_dt[1:]:
TypeError: int() argument must be a string, a bytes-like object or a real number, not 'Timedelta'
To Reproduce
Perform the first step in the tutorial on Anomaly Detection
Expected behavior
Receive a train & test dataset
Screenshots
N/A
Desktop (please complete the following information):
OS: Windows 11
Merlion Version: Main code branch
Additional context
Fixed the issue by changing line 87 in nab.py
FROM:
all_dt = np.unique(np.diff(df["timestamp"])).astype(np.int64)
TO:
all_dt = np.unique(np.diff(df["timestamp"]))
The text was updated successfully, but these errors were encountered:
Hi, I'm facing the same issue and did change the line 87 in nab.py as you described. However, i still have the same issue. Did you do something else after change the line 87 in nab.py?
I appreciate your answer.
Describe the bug
Following the Tutorial (A Gentle Introduction to Anomaly Detection in Merlion, I receive the following error:
84 df = df.drop_duplicates(subset="timestamp", keep="first")
85 logger.warning(f"Time series {csv} (index {i}) has timestamp duplicates. Kept first values.")
---> 87 all_dt = np.unique(np.diff(df["timestamp"])).astype(np.int64)
88 gcd_dt = all_dt[0]
89 for dt in all_dt[1:]:
TypeError: int() argument must be a string, a bytes-like object or a real number, not 'Timedelta'
To Reproduce
Perform the first step in the tutorial on Anomaly Detection
Expected behavior
Receive a train & test dataset
Screenshots
N/A
Desktop (please complete the following information):
Additional context
Fixed the issue by changing line 87 in nab.py
FROM:
all_dt = np.unique(np.diff(df["timestamp"])).astype(np.int64)
TO:
all_dt = np.unique(np.diff(df["timestamp"]))
The text was updated successfully, but these errors were encountered: