Skip to content

TypeError: compute_class_weight() takes 1 positional argument but 3 were given #20

@aravinthk00

Description

@aravinthk00

I working on this repo, in the training process I am facing below error log ,

[INFO] Start training process....
[INFO] Loading data from /content/drive/MyDrive/Work/Function_Vul/Function-level-Vulnerability-Detection//content/drive/MyDrive/Work/Function_Vul/Function-level-Vulnerability-Detection/data/TotalSource/C....
[INFO] The length of the loaded data list is : 3763
[INFO] Applying ELMo model!
[INFO] Setting padding length 1000 for ELMo model. Each textual sequence contains 1000 elements.
[INFO] Patition the data ....
[INFO] Data processing completed!
[INFO] -------------------------------------------------------
[INFO] There are 2408 total samples in the training set. 2393 vulnerable samples.
[INFO] There are 602 total samples in the validation set. 601 vulnerable samples.
Traceback (most recent call last):
File "main.py", line 34, in
helper.exec()
File "/content/drive/MyDrive/Work/Function_Vul/Function-level-Vulnerability-Detection/src/helper.py", line 199, in exec
class_weights = class_weight.compute_class_weight('balanced',
TypeError: compute_class_weight() takes 1 positional argument but 3 were given

Please anyone assist me for the repo issue.

Thankyou in advanced.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions