HelenGuohx / logbert

log anomaly detection via BERT
MIT License
240 stars 102 forks source link

HDFS/python logbert train #42

Open 2718455213wcx opened 1 year ago

2718455213wcx commented 1 year ago

Hello,when I run to this line of code: logkey_seq_pairs = np.array(logkey_seq_pairs) An error has occurred: ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 2 dimensions. The detected shape was (4855, 1) + inhomogeneous part.

How can I solve it?

Shown842 commented 10 months ago

I have the same problem。

revraj1207 commented 9 months ago

In file: logbert-main\bert_pytorch\dataset\sample.py: Line no: 90 and 91, add extra argument dtype=object. logkey_seq_pairs = np.array(logkey_seq_pairs, dtype=object) time_seq_pairs = np.array(time_seq_pairs, dtype = object)

vnaticzhock commented 7 months ago

you should just downgrade numpy to the version specified at requirement.txt.