Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/DLVulDet/PrimeVul
/ functions
Functions
58 in github.com/DLVulDet/PrimeVul
⨍
Functions
58
◇
Types & classes
13
↓ 5 callers
Method
__init__
(self, encoder, config, tokenizer, args)
os_expr/model.py:14
↓ 4 callers
Function
calculate_metrics
(labels, preds)
os_expr/run_ft.py:360
↓ 4 callers
Function
convert_examples_to_features
(js,tokenizer,args)
os_expr/run_ft_clr.py:45
↓ 3 callers
Function
calculate_metrics
(labels, preds)
os_expr/run_ft_clr.py:140
↓ 3 callers
Function
evaluate
(args, accelerator, eval_dataloader, eval_dataset, model, tokenizer, eval_when_training=False)
os_expr/run_ft_accelerator.py:306
↓ 3 callers
Function
evaluate
(args, model, tokenizer,eval_when_training=False)
os_expr/run_ft.py:373
↓ 2 callers
Function
calculate_metrics
(labels, preds)
os_expr/run_ft_accelerator.py:293
↓ 2 callers
Function
evaluate
(args, model, tokenizer,eval_when_training=False)
os_expr/run_ft_clr.py:358
↓ 2 callers
Method
get_t5_vec
(self, source_ids)
os_expr/model.py:149
↓ 2 callers
Function
set_seed
(seed=42)
os_expr/run_ft.py:106
↓ 1 callers
Function
analyze_predictions
(predictions_path, data_path)
os_expr/run_ft_accelerator.py:365
↓ 1 callers
Function
calculate_vul_det_score
Calculate the vulnerability detection score (VD-S) given a tolerable FPR. Args: - predictions: List of model prediction probabilitie
calc_vd_score.py:6
↓ 1 callers
Function
construct_prompts
(input_file, inst)
openai_expr/run_prompting.py:121
↓ 1 callers
Function
convert_examples_to_features
(js,tokenizer,args)
os_expr/run_ft_accelerator.py:59
↓ 1 callers
Function
convert_examples_to_features
(js,tokenizer,args)
os_expr/run_ft.py:64
↓ 1 callers
Method
get_bart_vec
(self, source_ids)
os_expr/model.py:164
↓ 1 callers
Function
get_openai_chat
( prompt, args )
openai_expr/run_prompting.py:59
↓ 1 callers
Method
get_roberta_vec
(self, source_ids)
os_expr/model.py:177
↓ 1 callers
Function
load_data
Load data from jsonl file
os_expr/run_ft_accelerator.py:357
↓ 1 callers
Function
main
()
os_expr/run_ft_accelerator.py:513
↓ 1 callers
Function
main
()
os_expr/run_ft.py:492
↓ 1 callers
Function
main
()
os_expr/run_ft_clr.py:477
↓ 1 callers
Function
main
()
openai_expr/run_prompting.py:136
↓ 1 callers
Function
set_seed
(seed=42)
os_expr/run_ft_clr.py:132
↓ 1 callers
Function
test
(args, accelerator, model, tokenizer)
os_expr/run_ft_accelerator.py:399
↓ 1 callers
Function
test
(args, model, tokenizer)
os_expr/run_ft.py:432
↓ 1 callers
Function
test
(args, model, tokenizer)
os_expr/run_ft_clr.py:414
↓ 1 callers
Function
test_prob
(args, model, tokenizer)
os_expr/run_ft_accelerator.py:470
↓ 1 callers
Function
train
Train the model
os_expr/run_ft_accelerator.py:97
↓ 1 callers
Function
train
Train the model
os_expr/run_ft.py:115
↓ 1 callers
Function
train
Train the model
os_expr/run_ft_clr.py:153
↓ 1 callers
Function
truncate_tokens_from_messages
Count the number of tokens used by a list of messages, and truncate the messages if the number of tokens exceeds the limit. Reference: h
openai_expr/run_prompting.py:19
Method
__getitem__
(self, i)
os_expr/run_ft_accelerator.py:93
Method
__getitem__
(self, i)
os_expr/run_ft.py:102
Method
__getitem__
(self, i)
os_expr/run_ft_clr.py:91
Method
__getitem__
(self, i)
os_expr/run_ft_clr.py:128
Method
__init__
(self, input_tokens, input_ids, idx, label
os_expr/run_ft_accelerator.py:46
Method
__init__
(self, tokenizer, args, file_path=None)
os_expr/run_ft_accelerator.py:82
Method
__init__
(self, input_tokens, input_ids, idx, label
os_expr/run_ft.py:51
Method
__init__
(self, tokenizer, args, file_path=None)
os_expr/run_ft.py:84
Method
__init__
(self, input_tokens, input_ids, idx, label
os_expr/run_ft_clr.py:32
Method
__init__
(self, tokenizer, args, file_path=None)
os_expr/run_ft_clr.py:56
Method
__init__
(self, tokenizer, args, file_path=None)
os_expr/run_ft_clr.py:109
Method
__init__
(self, temp)
os_expr/model.py:42
Method
__init__
(self, encoder,config,tokenizer,args,clr_mask,clr_temp=1.0)
os_expr/model.py:52
Method
__init__
(self, encoder, config, tokenizer, args)
os_expr/model.py:128
Method
__init__
(self, encoder, config, tokenizer, args)
os_expr/model.py:141
Method
__init__
(self, encoder, config, tokenizer, args)
os_expr/model.py:206
Method
__len__
(self)
os_expr/run_ft_accelerator.py:90
Method
__len__
(self)
os_expr/run_ft.py:99
Method
__len__
(self)
os_expr/run_ft_clr.py:88
Method
__len__
(self)
os_expr/run_ft_clr.py:125
Method
forward
(self, input_ids=None, labels=None, weight=None)
os_expr/model.py:22
Method
forward
(self, x, y)
os_expr/model.py:47
Method
forward
(self, group_inputs=None,group_labels=None)
os_expr/model.py:63
Method
forward
(self, input_ids=None, labels=None)
os_expr/model.py:131
Method
forward
(self, source_ids=None, labels=None, weight=None)
os_expr/model.py:182
Method
forward
(self, input_ids=None, labels=None, weight=None)
os_expr/model.py:214