Skip to content

코드 유사성 판단 시즌2 AI 경진대회, DACON (2024.03.04 ~ 2024.04.01)

Notifications You must be signed in to change notification settings

GNOEYHEAT/CodeSim_cpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CodeSim_cpp

The following codes are the solutions (1st place, private score: 0.9911) for the dacon competition.

1. Environmental settings

1.1 Clone this repository

git clone https://github.com/GNOEYHEAT/CodeSim_cpp.git
cd CodeSim_cpp

1.2 Install packages

pip install -r requirements.txt 

Directory Structure

├── Dataset
│   ├── train_code
│   │   ├── problem001
│   │   ├── ...
│   │   └── problem500
│   ├── sample_submission.csv
│   ├── sample_train.csv
│   └── test.csv
├── Utils
│   ├── CodeLM_utils.py
│   └── Preprocessing_utils.py
├── Preprocess.py
└── CodeLM.py

2. Data Proprocessing

python Preprocess.py 

3. Train Model

python CodeLM.py

4. Experiment Results

The final submission is GraphCodeBERT+UniXcoder.

Preprocessed Datasets

Datasets

  • The hyperparameters are as follows:
    • truncation_side='left', bm25='bm25plus'

Pre-trained Models

Models

  • The hyperparameters are as follows:
    • truncation_side='left', optimizer='adamw', learning_rate=0.00003

Results

Preds

index CodeBERT Model frac text_len Pr Acc Pl Acc Val Acc
exp_30 GraphCodeBERT 0.01 512 0.98859 0.98831 0.99641
exp_31 GraphCodeBERT 0.02 512 0.98909 0.98892 0.99794
exp_32 UniXcoder 0.01 1024 0.98942 0.98911 0.99606
exp_31+32 GraphCodeBERT+UniXcoder - - 0.99111 0.99084 -