AI4Risk / antifraud

A repository for financial fraud detection
GNU General Public License v3.0
174 stars 43 forks source link

CUDA Error: device-side assert triggered only with S-FFSD dataset using rgtan method #22

Closed TangWalden closed 4 months ago

TangWalden commented 4 months ago

Hello,

I'm encountering a CUDA error when I attempt to run the rgtan method with the S-FFSD dataset using the command:

python main.py --method rgtan

This issue only occurs with the S-FFSD dataset; when I use the Yelp dataset, the program runs without any issues. The specific error message, as shown in the screenshot below, indicates a "CUDA error: device-side assert triggered."

1

bingreeky commented 4 months ago

Could you please run the command on CPU? This will possibly give more detailed information about the errors.

TangWalden commented 4 months ago

I tried running it on the CPU, but due to issues with the DGL library, the command couldn't execute. So, I switched back to running on the GPU and found that my error was similar to an issue discussed previously.

I changed the 317-318 within the rgtan_model.py file as follows:

self.cat_table = nn.ModuleDict({col: nn.Embedding(max(df[col].unique()) + 10, in_feats_dim).to(device) for col in cat_features if col not in {"Labels", "Time"}})

Now it runs without any errors. The problem is solved.

Thanks for your help!