Closed timotheemathieuinsa closed 2 years ago
This error means that your GPU is too small to run the example. You can run the code on your CPU as well (but this will be a lot slower). Try removing/commenting out the part:
if torch.cuda.is_available():
# Set deeplog to device
deeplog = deeplog.to("cuda")
# Set data to device
X_train = X_train .to("cuda")
y_train = y_train .to("cuda")
X_test = X_test .to("cuda")
y_test = y_test .to("cuda")
X_test_anomaly = X_test_anomaly.to("cuda")
y_test_anomaly = y_test_anomaly.to("cuda")
Alternatively, you can also reduce the input and output size of DeepLog for this example. These parameters are used by DeepLog to determine how many different log types to expect. We set it to 300 because this was the amount of log types we had in our largest dataset, but for the HDFS dataset, we can set it to a lower number (e.g., 30, but please double check whether this is enough). By changing the input and output size, the model itself will become smaller and might fit on your GPU. To do so, please change the following part of the example:
# Create DeepLog object
deeplog = DeepLog(
input_size = 30, # Number of different events to expect, I think 30 should be enough but please check
hidden_size = 64 , # Hidden dimension, we suggest 64
output_size = 30, # Number of different events to expect, I think 30 should be enough but please check
)
Hi, i'm trying to run the example_hdfs.py with the logs given and I get this error : `RuntimeError Traceback (most recent call last)