Skip to content

FSoft-AI4Code/SafetyCode

Repository files navigation

Code Safety

...


🛠️ Full Setup

1. Environment Setup

git clone https://github.com/FSoft-AI4Code/SafetyCode.git && cd SafetyCode
conda create -n verl_safe python=3.10 -y
conda activate verl_safe
bash install.sh

2. Training

Run training for your target dataset and model size:

# For SecCodePLT+  
bash run/seccodeplt/hybrid-[0.5b|3b|7b].sh

# For APPS+  
bash run/apps-code/hybrid-[0.5b|3b|7b].sh

# For SafeSQL  
bash run/safesql/hybrid-[0.5b|3b|7b].sh

💾 Checkpoints are automatically saved to: checkpoints/[proj_name]/[exp_name]

3. Evaluation

Execute the evaluation pipeline after training:

# For SecCodePLT+
bash experiments/seccodeplt/seccodeplt_eval_main.sh

# For APPS+
bash experiments/safesql_and_apps/apps_eval_main.sh [path_to_exp_dir] [sharded|single]

# For SafeSQL
bash experiments/safesql_and_apps/safesql_eval_main.sh [path_to_exp_dir] [sharded|single]

This codebase is inspired by this paper. Thanks to the authors for their great work.


About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published