Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error during operation #69

Open
huliqujing opened this issue Mar 9, 2022 · 2 comments
Open

Error during operation #69

huliqujing opened this issue Mar 9, 2022 · 2 comments

Comments

@huliqujing
Copy link

Hello Kyle,

I have a question for you, an error pops up when I run python example.py -l labeled_anomalies.csv. The error occurred after a certain epoch. I executed the code twice and got the error after the 16th and 20th epochs. The error content is as follows:

Epoch 19/35
2096/2096 [==============================] - 22s 11ms/step - loss: 0.0106 - val_loss: 1.6608e-04
Epoch 20/35
2096/2096 [==============================] - 21s 10ms/step - loss: 0.0101 - val_loss: 2.0771e-04
normalized prediction error: 0.01
Traceback (most recent call last):
  File "example.py", line 10, in <module>
    detector.run()
  File "E:\Zotero\Paper\storage\37LDVKWR\telemanom\telemanom\detector.py", line 210, in run
    errors.process_batches(channel)
  File "E:\Zotero\Paper\storage\37LDVKWR\telemanom\telemanom\errors.py", line 141, in process_batches
    window.prune_anoms()
  File "E:\Zotero\Paper\storage\37LDVKWR\telemanom\telemanom\errors.py", line 418, in prune_anoms
    E_seq = np.delete(E_seq, i_to_remove, axis=0)
  File "<__array_function__ internals>", line 6, in delete
  File "D:\Anaconda3\envs\tf2\lib\site-packages\numpy\lib\function_base.py", line 4406, in delete
    keep[obj,] = False
IndexError: arrays used as indices must be of integer (or boolean) type

Thank you very much and hope to hear from you soon.

@ly1112
Copy link

ly1112 commented Nov 15, 2022

Hello Kyle,

I have a question for you, an error pops up when I run python example.py -l labeled_anomalies.csv. The error occurred after a certain epoch. I executed the code twice and got the error after the 16th and 20th epochs. The error content is as follows:

Epoch 19/35
2096/2096 [==============================] - 22s 11ms/step - loss: 0.0106 - val_loss: 1.6608e-04
Epoch 20/35
2096/2096 [==============================] - 21s 10ms/step - loss: 0.0101 - val_loss: 2.0771e-04
normalized prediction error: 0.01
Traceback (most recent call last):
  File "example.py", line 10, in <module>
    detector.run()
  File "E:\Zotero\Paper\storage\37LDVKWR\telemanom\telemanom\detector.py", line 210, in run
    errors.process_batches(channel)
  File "E:\Zotero\Paper\storage\37LDVKWR\telemanom\telemanom\errors.py", line 141, in process_batches
    window.prune_anoms()
  File "E:\Zotero\Paper\storage\37LDVKWR\telemanom\telemanom\errors.py", line 418, in prune_anoms
    E_seq = np.delete(E_seq, i_to_remove, axis=0)
  File "<__array_function__ internals>", line 6, in delete
  File "D:\Anaconda3\envs\tf2\lib\site-packages\numpy\lib\function_base.py", line 4406, in delete
    keep[obj,] = False
IndexError: arrays used as indices must be of integer (or boolean) type

Thank you very much and hope to hear from you soon.

Hi, I have the same issue as you. Did you find a way to solve it and can you share your solution? Thank you so much!

@gujingit
Copy link

change code E_seq = np.delete(E_seq, i_to_remove, axis=0) to E_seq = np.delete(E_seq, i_to_remove.astype(np.int), axis=0) in telemanom/errors.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants