[Python] Error While Running Data Preprocessing Script in...

Discussão em 'Python' iniciado por Stack, Novembro 30, 2024.

  1. Stack

    Stack Membro Participativo

    I want to run the code in the repository https://github.com/zahrazarezadeh1999/counterfactual-vulnerability-detection/tree/main on a CPU. I was running a Python script called data_pre.py as part of a project, and I encountered multiple issues while processing the data. Initially, the script attempted to access a file located at /home/user20/Desktop/counterfactual-vulnerability-detection-main/cfexplainer/storage/cache/minimal_datasets/minimal_bigvul.pq, but it failed with a "No such file or directory" error. This file seemed to be a critical part of the process, and its absence prevented the script from continuing as intended. Despite this error, the script continued running some operations, showing progress bars for data processing, but it was clear that the missing file caused major issues downstream.

    Later, the script threw another error, this time related to a DataFrame operation in pandas. The error message stated: ValueError: Cannot set a DataFrame without columns to the column mod_prop. It seemed that the DataFrame, which was expected to have data, either didn’t load correctly or was empty due to the missing file or some other issue earlier in the process. This error stopped the execution of the script entirely, leaving me unable to complete the task.

    I ran the code using a GPU and encountered the same error. This time, I tried running it on a CPU, but I faced the same error again. What do you suggest to resolve this issue?

    Continue reading...

Compartilhe esta Página