Skip to content
Open
Show file tree
Hide file tree
Changes from 158 commits
Commits
Show all changes
161 commits
Select commit Hold shift + click to select a range
a7403b5
Setting up GitHub Classroom Feedback
github-classroom[bot] Sep 30, 2024
befcc79
Create Issue Template feature.md
yeseoLee Oct 1, 2024
559cf40
Create Issue Template experiment.md
yeseoLee Oct 1, 2024
8b97bdb
Create pull_request_template.md
yeseoLee Oct 1, 2024
923dc13
Update Issue Template - feature.md
yeseoLee Oct 1, 2024
771c294
Create Issue Template config.yml
yeseoLee Oct 1, 2024
51be01a
Update config.yml
yeseoLee Oct 1, 2024
7fafbb1
Update feature.md
yeseoLee Oct 1, 2024
dfceb08
Update experiment.md
yeseoLee Oct 1, 2024
d61de72
Update experiment.md
yeseoLee Oct 1, 2024
4a66a07
[STYLE]EDA관련 폴더, 파일 생성
nevertmr Oct 2, 2024
9f56c6f
feat: argument.py 기능 코드 추가
Sujinkim-625 Oct 2, 2024
4360412
Merge pull request #7 from boostcampaitech7/feat/베이스라인-코드-간소화
Sujinkim-625 Oct 2, 2024
b756570
[chore] 초기 프로젝트 구성
yeseoLee Oct 2, 2024
2cb99a9
style: Code Formatting
yeseoLee Oct 2, 2024
1af6048
feat: seed 설정 통일
yeseoLee Oct 2, 2024
42c4a24
fix: deprecated Argument 제거
yeseoLee Oct 2, 2024
3e2d65c
[feat]train, test set에 대한 EDA
nevertmr Oct 4, 2024
3d54165
[feat]wiki_corpus에 대한 EDA
nevertmr Oct 4, 2024
ebe6bd7
[feat]전처리 이후 새로운 json파일 생성 코드 추가
nevertmr Oct 4, 2024
beb6a41
Merge pull request #8 from boostcampaitech7/feat/베이스라인-코드-간소화
yeseoLee Oct 5, 2024
db27d3f
style: scripts -> setup 으로 폴더명 변경 #4
yeseoLee Oct 6, 2024
a91d4bf
feat: git 세팅 스크립트 구현 #4
yeseoLee Oct 6, 2024
1ccefc9
style: utils_qa 간단한 주석 추가 #4
yeseoLee Oct 6, 2024
50c8391
feat: 시드 세팅 변경
yeseoLee Oct 6, 2024
f0ceaf0
style: 주석 및 미사용 코드 정리 #4
yeseoLee Oct 7, 2024
44938e8
feat: arguments base_model 추가
yeseoLee Oct 7, 2024
1a5f4df
feat: run script 작성 (train & inference) #4
yeseoLee Oct 7, 2024
e3b15a7
Merge pull request #9 from boostcampaitech7/feat/베이스라인-코드-간소화
yeseoLee Oct 7, 2024
809cb9a
feat: elasticsearch 세팅 스크립트 작성
yeseoLee Oct 8, 2024
6ad780d
feat: elasticsearch 세팅 스크립트
yeseoLee Oct 8, 2024
1983fe6
docs: elasticsearch 개념 정리 #10
yeseoLee Oct 9, 2024
feffff2
[feat]eda todo추가
nevertmr Oct 10, 2024
55f7191
feat:BM25 구현
Effyee Oct 10, 2024
470ce83
feature
Sujinkim-625 Oct 10, 2024
0f51070
feature
Sujinkim-625 Oct 10, 2024
5cbb9ad
feature: arguments.py
Sujinkim-625 Oct 10, 2024
9297e35
Merge pull request #17 from boostcampaitech7/feat/BM25-retrieval
Sujinkim-625 Oct 10, 2024
244eb8c
Merge pull request #15 from boostcampaitech7/feat/arguments.py-추가
Sujinkim-625 Oct 10, 2024
b9afe7d
Merge remote-tracking branch 'origin/Develop' into feat/elasticsearch…
yeseoLee Oct 10, 2024
fd87d17
feat:add cnn layer
Effyee Oct 10, 2024
7492f2b
feature: train_cnn.py
Sujinkim-625 Oct 10, 2024
9103917
feature: train_cnn.py
Sujinkim-625 Oct 10, 2024
822bbf9
feature: train_cnn.py
Sujinkim-625 Oct 10, 2024
be7ea46
feat: inference 누락 코드 추가 (return_token_type_ids) #10
yeseoLee Oct 10, 2024
98d1d6f
feat: elasticsearch 세팅 및 의존성 구현 #10
yeseoLee Oct 10, 2024
70af0a7
feat: elasticsearch argument, inference, retrieval 구현 #10
yeseoLee Oct 10, 2024
304edba
feat: elasticsearch 세팅 json 추가 #10
yeseoLee Oct 10, 2024
ef321a9
feat: 패키지 인식 init 파일 추가 #10
yeseoLee Oct 10, 2024
36d521f
fix: 패키지명 충돌로 폴더명 변경 #10
yeseoLee Oct 10, 2024
d9312ca
fix: elasticsearch 패키지명 오타 수정 #10
yeseoLee Oct 10, 2024
e1d10ac
Merge pull request #19 from boostcampaitech7/feat/add_cnn_layer
Effyee Oct 11, 2024
adec41f
Merge branch 'Develop' into feat]eda-레퍼런스-분석-및-진행
nevertmr Oct 11, 2024
b5ecb16
Merge pull request #18 from boostcampaitech7/feat]eda-레퍼런스-분석-및-진행
nevertmr Oct 11, 2024
c8e6e20
fix: data 상대경로 수정 #10
yeseoLee Oct 11, 2024
d1a74d5
Merge pull request #20 from boostcampaitech7/feat/elasticsearch-retri…
yeseoLee Oct 11, 2024
d9da190
refactor: retrieval 패키지화 #23
yeseoLee Oct 11, 2024
dd813f5
refactor: utils 패키지 분리 #23
yeseoLee Oct 11, 2024
143db3f
refactor: requirement.txt setup 폴더로 이동
yeseoLee Oct 11, 2024
0e98fd9
fix: es setup script 에러 수정
yeseoLee Oct 11, 2024
be66856
feat: setup server script 파이썬 패키지 설치 추가
yeseoLee Oct 11, 2024
d9af72e
Merge pull request #24 from boostcampaitech7:feat/es-setup-script
yeseoLee Oct 11, 2024
3ec1d88
Merge remote-tracking branch 'origin/Develop' into feat/refactor-base…
yeseoLee Oct 11, 2024
5812e65
feat: add softvoting
Effyee Oct 12, 2024
40148d1
refector: utils 패키지 생성
yeseoLee Oct 13, 2024
b54086f
refector: inferece 코드 통합
yeseoLee Oct 13, 2024
edf0686
refector: train 코드 통합
yeseoLee Oct 13, 2024
cc05090
refector: retrieval 추상화
yeseoLee Oct 13, 2024
36da98f
refector: utils -> utils_qa로 병합 #23
yeseoLee Oct 13, 2024
3aeb6ef
feat: argument로 class 불러오는 방식 수정
yeseoLee Oct 13, 2024
81cf8c9
fix: retrieval 인자 관련 오류 수정
yeseoLee Oct 13, 2024
1c742b4
chore: add gitignore
yeseoLee Oct 13, 2024
5a2f226
feat: config json 샘플 생성 #23
yeseoLee Oct 13, 2024
c1c1de3
refector: elastic 관련 코드 병합 #23
yeseoLee Oct 13, 2024
4ca6040
refector: eda -> notebooks 폴더명 변경 #23
yeseoLee Oct 13, 2024
df03260
fix: ElasticClient 오류 수정 & notebook 생성 #23
yeseoLee Oct 13, 2024
e80e058
feat:add soft voting
Effyee Oct 14, 2024
1f71281
Merge pull request #26 from boostcampaitech7/feat/soft_voting_ensemble
Effyee Oct 14, 2024
243ad86
fix: TrainingArguments -> CustomTrainingArguments로 수정 #23
yeseoLee Oct 14, 2024
a3d3c3b
Merge remote-tracking branch 'origin/Develop' into feat/refactor-base…
yeseoLee Oct 14, 2024
501e449
Merge pull request #28 from boostcampaitech7/feat/refactor-baseline
yeseoLee Oct 14, 2024
9aaf4bc
feature: inference.py
Sujinkim-625 Oct 14, 2024
b655a92
feature: arrow_to_csv.py
Sujinkim-625 Oct 14, 2024
5f52c34
feature: csv_to_arrow.py
Sujinkim-625 Oct 14, 2024
57719cd
feature: find_answer_start.py
Sujinkim-625 Oct 14, 2024
a3f77ce
feature: train_for_training.py
Sujinkim-625 Oct 14, 2024
f341323
Merge pull request #31 from boostcampaitech7/feat/inference-eval
Sujinkim-625 Oct 15, 2024
93787f8
feature: 필요없는 주석 삭제
Sujinkim-625 Oct 15, 2024
05ba390
Merge pull request #32 from boostcampaitech7/exp/train_for_training
Sujinkim-625 Oct 15, 2024
ea0dc6f
feat]GPT 활용 질의유형분류
nevertmr Oct 15, 2024
720af12
feat]GPT 활용 데이터생성
nevertmr Oct 15, 2024
16109e3
refector: 코드 실행 방법 정리
yeseoLee Oct 15, 2024
db4af6a
fix: default argument 수정 #34
yeseoLee Oct 15, 2024
4fe8407
feat: integration-pipeline 구축
yeseoLee Oct 15, 2024
aa2e06a
feat: 데이터 클리닝을 위한 EDA #33
yeseoLee Oct 15, 2024
b257165
refector: 폴더 구조 단순화를 위해 일단 notebooks에 docs 병합 #34
yeseoLee Oct 15, 2024
b8e7f38
fix: outputs 경로 수정, train eval 추가 #34
yeseoLee Oct 16, 2024
459a295
Merge pull request #35 from boostcampaitech7/feat/integration-pipeline
yeseoLee Oct 16, 2024
5d3416a
Merge remote-tracking branch 'origin/Develop' into exp/data-cleaning
yeseoLee Oct 16, 2024
c05aa7e
feat: 데이터 검증 내역 추가
yeseoLee Oct 16, 2024
848a269
Merge pull request #38 from boostcampaitech7/exp/data-cleaning
yeseoLee Oct 16, 2024
8be843c
feat: csv_to_arrow 고도화
yeseoLee Oct 16, 2024
e390551
style: 폴더명 변경 train_for_training -> external_dataset_processing
yeseoLee Oct 16, 2024
ef79460
Merge pull request #39 from boostcampaitech7/feat/csv_converter
yeseoLee Oct 16, 2024
27c17b2
feat: utils_qa에 denseretrieval 추가
hsmin9809 Oct 17, 2024
6440adc
feat: dense encoder 추가
hsmin9809 Oct 17, 2024
2ce1396
add Hard Voting
Effyee Oct 18, 2024
2d02685
Update hard_voting.py
Effyee Oct 18, 2024
85d8a0d
Update soft_voting.py
Effyee Oct 18, 2024
42ba938
add hardvoting
Effyee Oct 18, 2024
735c29d
Merge remote-tracking branch 'origin/feat/hard_voting' into feat/hard…
Effyee Oct 18, 2024
7bc660b
Update soft_voting.py
Effyee Oct 20, 2024
cd1e468
Merge branch 'feat/hard_voting' of https://github.com/boostcampaitech…
Effyee Oct 20, 2024
44a4767
Remove ensemble/results/.gitkeep file
Effyee Oct 20, 2024
1069f53
Merge pull request #43 from boostcampaitech7/feat/hard_voting
nevertmr Oct 20, 2024
60ec80c
feat: inference할 때 매번 retriver를 수행하지 않고 저장된 결과를 사용할 수 있는 옵션 추가 #40
yeseoLee Oct 20, 2024
316d425
feat: reranker 구현 #40
yeseoLee Oct 20, 2024
e283265
fix: reranker 배치 사이즈 증가 및 인자 추가 #40
yeseoLee Oct 20, 2024
d2c0e2d
[feat] 데이터 셔플 기능 구현
nevertmr Oct 21, 2024
bcab5ee
Merge branch 'exp/hybrid_rerank_retriever' into origin/Develop
hsmin9809 Oct 21, 2024
5792adb
feat]질문 생성 증강 추가
nevertmr Oct 22, 2024
a470cf3
feat]질문동의어 증강 구현
nevertmr Oct 22, 2024
508a349
feat: retriever_evaluation
yeseoLee Oct 22, 2024
5a7097c
fix: 디벨롭 브랜치 삭제될 때 날아간 커밋 복구
yeseoLee Oct 22, 2024
6d0d819
Merge pull request #50 from boostcampaitech7/exp/retriever_evaluation
yeseoLee Oct 22, 2024
7c54c79
Merge pull request #49 from boostcampaitech7/feat/data_aug
nevertmr Oct 22, 2024
48d2888
feat: bm25 개선
yeseoLee Oct 22, 2024
52fd9fb
feat: ElasticRerankRetriever 구현
yeseoLee Oct 22, 2024
6e3a2f7
fix: 데이터 직렬화 과정에서 타입 에러 수정
yeseoLee Oct 22, 2024
6c2c7ba
Merge pull request #51 from boostcampaitech7/exp/rerank
nevertmr Oct 22, 2024
dbad395
feat: dense encoder train 파일 추가
hsmin9809 Oct 22, 2024
8ab58cc
feat: dense retrieval top-k 결과 확인 ipynb 추가
hsmin9809 Oct 22, 2024
f5dba5c
Merge pull request #54 from boostcampaitech7/feat/dense_eval
nevertmr Oct 22, 2024
cbbe149
feat: dense train 파일 수정
hsmin9809 Oct 22, 2024
5dec3cc
feat: wandb dir 수정
hsmin9809 Oct 22, 2024
bfac4d4
feat: top-k notebook 수정
hsmin9809 Oct 22, 2024
6faf022
feat: output dir 수정
hsmin9809 Oct 22, 2024
3cba8aa
feat: output_dir 다시 수정
hsmin9809 Oct 22, 2024
ab70134
fix: 오탈자 수정 및 작은 옵션 변경
yeseoLee Oct 23, 2024
27d5451
feat: argument에 전이 학습시 checkpoint 무시하는 옵션 추가
yeseoLee Oct 23, 2024
3b7c14d
feat: dense train 파일명 변경
hsmin9809 Oct 23, 2024
ff0d1a2
feat: DenseRetrieval 코드 수정 및 BertEncoder.py 모듈(train 및 retrieval 사용 시…
hsmin9809 Oct 23, 2024
93dad5a
Merge pull request #55 from boostcampaitech7/exp/rerank
yeseoLee Oct 23, 2024
b2a2781
feat: dense retrieval에 tqdm을 추가 → 문서 찾는 진행 상황 확인
hsmin9809 Oct 24, 2024
c8389f5
feat: retriever 성능 평가
yeseoLee Oct 24, 2024
37f459b
feat: retriever reranker 기반 negative passage 추가 데이터셋 생성
yeseoLee Oct 24, 2024
7bef96c
Merge pull request #57 from boostcampaitech7/exp/analysis-retrieval
nevertmr Oct 24, 2024
6bde379
feat: top-k 확인 노트북 일부 수정
hsmin9809 Oct 24, 2024
45c1535
feat: BertEncoder 외부로 저장
hsmin9809 Oct 24, 2024
cf55edb
Merge pull request #58 from boostcampaitech7/feat/dense_tuning
nevertmr Oct 24, 2024
31104b1
[feat]GPT기반앙상블코드구현
nevertmr Oct 25, 2024
d8e524e
Merge pull request #60 from boostcampaitech7/exp/LLM-voting
nevertmr Oct 25, 2024
80bd026
Merge pull request #61 from boostcampaitech7/origin/Develop
yeseoLee Oct 25, 2024
e8afb20
docs: 노션으로 관리되는 문서 삭제
yeseoLee Oct 28, 2024
411ffe2
README 작성 및 렙업 리포트 업로드
yeseoLee Oct 28, 2024
2c54bcc
Update README.md
yeseoLee Oct 28, 2024
ac1bc0e
Update README.md
yeseoLee Oct 28, 2024
f2accd1
Update README.md
nevertmr Oct 28, 2024
e3d513a
README.md 수정
Sujinkim-625 Nov 11, 2024
99e46a4
Update README.md
yeseoLee Dec 2, 2024
f42d398
fix: change team member username
nevertmr Nov 16, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: false
issue_templates:
- name: Experiment Template
description: For new experiments
file: experiment.md
- name: Feature Template
description: For new features
file: feature.md
26 changes: 26 additions & 0 deletions .github/ISSUE_TEMPLATE/experiment.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: Experiment Issue
about: For new experiments
title: "[EXP]"
labels:
assignees: ''
---

# ISSUE: Experiment

## 노션 링크


## 실험 목적

- 목적 1
- 목적 2

## 체크리스트

- [ ] 할일 1
- [ ] 할일 2
- [ ] 할일 3

## 실험 내용

26 changes: 26 additions & 0 deletions .github/ISSUE_TEMPLATE/feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: Feature Request
about: Suggest a new feature for this project
title: "[FEAT]"
labels:
assignees: ''
---

# ISSUE: Feature

## 노션 링크


## 기능 목적

- 목적 1
- 목적 2

## 체크리스트

- [ ] 할일 1
- [ ] 할일 2
- [ ] 할일 3

## 기능 내용

13 changes: 13 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## PR 정보

- 목적:
- 이슈 번호:
- 노션 작업 카드 링크:

## 변경 사항

- 이번 PR에서 작업한 내용을 간략히 설명

## 리뷰 참고사항

- 리뷰어에게 필요한 설명이나 특별히 봐주었으면 하는 부분을 작성
35 changes: 35 additions & 0 deletions .gitignore
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.vscode 도 추가해주면 좋습니다

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

기본적으로 github에서 제공하는 python gitignore에서 시작하면 어떨까 합니다

https://github.com/github/gitignore/blob/main/Python.gitignore

Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
.idea/
# macOS
*DS_Store

# custom
data/*
!data/.gitkeep
wandb
models
outputs
/eda/eda_ignore/
ensemble/results_hard
ensemble/results_soft

**/.ipynb_checkpoints
**/lightning_logs
*.ckpt
*.pt
*.arrow
*.bin
*/nohup.out
code/config/exp/*
109 changes: 109 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
# ODQA(Open-Domain Question Anwering Competition)

## 개요

| 항목 | 내용 |
| --- | --- |
| 프로젝트 주제 | MRC(기계독해) 데이터셋으로 ODQA(Open-Domain Question Answering)를 수행합니다. <br>RAG(Retrieval-Augmented Generation)로 더 많이 알려져 있습니다. |
| 프로젝트 구성 | 질문에 관련된 문서를 찾는 Retriever와 찾아온 문서에서 질문에 대한 정답을 찾는 Reader로 구성됩니다. |
| 평가 지표 | Exact Match (EM) Score를 사용하여 모델의 예측과, 실제 답이 정확하게 일치할 때만 점수가 주어집니다. <br>F1 Score는 참고용으로만 활용됩니다. |
| 진행 기간 | 2024년 10월 2일 ~ 2024년 10월 24일 |

## 최종 리더보드 (Private)
<img width="1216" alt="image" src="./assets/leaderboard.png">

## 팀원

|[이예서](https://github.com/yeseoLee)|[김수진](https://github.com/Sujinkim-625)|[김민서](https://github.com/luckyvickyricky)|[홍성재](https://github.com/koreannn)|[양가연](https://github.com/gayeon7877)|[홍성민](https://github.com/hsmin9809)|
|:-:|:-:|:-:|:-:|:-:|:-:|
|<a href="https://github.com/yeseoLee"><img src="https://github.com/yeseoLee.png" width='300px' style="border-radius: 50%;"></a>|<a href="https://github.com/Sujinkim-625"><img src="https://github.com/Sujinkim-625.png" width='300px' style="border-radius: 50%;"></a>|<a href="https://github.com/luckyvickyricky"><img src="https://github.com/luckyvickyricky.png" width='300px' style="border-radius: 50%;"></a>|<a href="https://github.com/koreannn"><img src="https://github.com/koreannn.png" width='300px' style="border-radius: 50%;"></a>|<a href="https://github.com/gayeon7877"><img src="https://github.com/gayeon7877.png" width='300px' style="border-radius: 50%;"></a>|<a href="https://github.com/hsmin9809"><img src="https://github.com/hsmin9809.png" width='300px' style="border-radius: 50%;"></a>|

## 역할

| 이름 | 역할 |
| --- | --- |
| 김민서 | 데이터분석, LLM기반 데이터 증강, 모델실험(증강 데이터 비교), 앙상블 |
| 김수진 | 외부데이터 리서치 및 학습, 데이터 전처리, 모델 리서치, 모델 개선, 모델 실험, <br>Retrieval 구현 및 실험(ColBERT), 앙상블 |
| 양가연 | Retrieval(BM25) 구현 및 실험, 모델 리서치, 모델 개선(Custom Layer, Distillation), <br>모델 실험, 앙상블(hard ensemble, soft ensemble, weighted ensemble) |
| 이예서 | PM(마일스톤 및 이슈 관리), 인프라 담당(개발환경 구성 스크립트화), <br>베이스라인 코드 템플릿화, 데이터 전처리(cleansing), 데이터 증강(negative passage), <br>Retrieval 구현 및 실험(Elasticsearch, Reranking), 앙상블 (merged ensemble) |
| 홍성민 | 모델 리서치, 모델 실험, Retrieval 구현 및 실험(Dense), 앙상블 |
| 홍성재 | EDA, 데이터 전처리, Reader성능 개선 관련 조사(Retrospective Reader), 앙상블 |

## Wrap-Up Report
### [MRC_NLP_리포트(04조).pdf](./assets/MRC_NLP_04_report.pdf)
데이터 EDA부터 앙상블까지 프로젝트 전반의 시행착오와 솔루션 및 회고는 렙업 리포트를 통해 확인할 수 있습니다.

## 폴더 구조
```bash
level2-mrc-nlp-04
├── code
│ ├── BertEncoder.py
│ ├── README.MD
│ ├── arguments.py
│ ├── config
│ │ ├── elastic_setting.json
│ │ ├── eval.json
│ │ ├── inference.json
│ │ ├── inference_with_rerank.json
│ │ ├── integration.json
│ │ └── train.json
│ ├── custom_model.py
│ ├── dense_train.py
│ ├── inference.py
│ ├── integration_pipeline.py
│ ├── retrieval
│ │ ├── __init__.py
│ │ ├── base.py
│ │ ├── bm25.py
│ │ ├── dense.py
│ │ ├── dense_encoder
│ │ ├── elastic.py
│ │ ├── reranker.py
│ │ └── tdidf.py
│ ├── train.py
│ └── utils
│ ├── __init__.py
│ ├── trainer_qa.py
│ └── utils_qa.py
├── data
├── ensemble
│ ├── gpt_voting.ipynb
│ ├── hard_voting.py
│ ├── results_hard
│ ├── results_soft
│ └── soft_voting.py
├── external_dataset_processing
│ ├── arrow_to_csv.py
│ ├── csv_to_arrow.py
│ ├── find_answer_start.py
│ └── train_for_training.py
├── notebooks
│ ├── EDA_train,test.ipynb
│ ├── EDA_wiki.ipynb
│ ├── add_question_augmentation_GPT.ipynb
│ ├── analyze_test_difficulty.ipynb
│ ├── data_info1.png
│ ├── dense_top-k_confirm.ipynb
│ ├── eda_for_data_cleaning.ipynb
│ ├── elasticsearch.ipynb
│ ├── question_classification_GPT.ipynb
│ ├── retriever_base_dataset.ipynb
│ ├── retriever_evaluation.ipynb
│ ├── shuffle_data.ipynb
│ └── synonym_questions_augmentation_GPT.ipynb
└── setup
├── requirements.txt
├── setup-elasticsearch.bash
├── setup-git.bash
└── setup-gpu-server.bash
```

- code: 학습 및 추론에 사용되는 코드 전반을 관리합니다.
- data: 학습 및 추론에 필요한 데이터를 관리합니다.
- ensemble: 추론 결과 파일을 이용한 앙상블을 수행하는 코드를 관리합니다.
- external_dataset_processing: 외부 데이터셋 사용을 위한 전처리 코드를 관리합니다.
- notebooks: 데이터 분석 및 전처리, 증강 방법 소개와 구현 코드 사용법 안내 등의 주피터 노트북 파일을 관리합니다.
- setup: GPU 서버 개발 환경 세팅을 위한 스크립트를 관리합니다.

## 실행 방법
[학습 및 추론 코드 사용 방법](code/README.MD)
Binary file added assets/MRC_NLP_04_report.pdf
Binary file not shown.
Binary file added assets/leaderboard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions code/BertEncoder.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
from transformers import BertModel, BertPreTrainedModel

class BertEncoder(BertPreTrainedModel):

def __init__(self,
config
):
super(BertEncoder, self).__init__(config)

self.bert = BertModel(config)
self.init_weights()


def forward(self,
input_ids,
attention_mask=None,
token_type_ids=None
):

outputs = self.bert(
input_ids,
attention_mask=attention_mask,
token_type_ids=token_type_ids
)

pooled_output = outputs[1]
return pooled_output
70 changes: 70 additions & 0 deletions code/README.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# 실행 방법
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dependency 설치가 빠져 있습니다. python version, cuda 버전 등도 기록해주세요

## 통합 파이프라인으로 실행
```bash
# train-eval-inference 통합 파이프라인
python integration_pipline.py ./config/integration.json
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
python integration_pipline.py ./config/integration.json
python integration_pipeline.py ./config/integration.json

```

## config.json으로 실행
```bash
# 학습
python train.py ./config/train.json
# 평가
python train.py ./config/eval.json
# 추론
python inference.py ./config/inference.json
```

## 쉘 스크립트로 실행
### 학습 또는 평가 방법
```bash
python train.py \
--model_name_or_path klue/bert-base \
--config_name None \
--tokenizer_name None \
\
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

중간 \는 불필요해보입니다

--dataset_name ../data/train_dataset \
--max_seq_length 384 \
--pad_to_max_length False \
--doc_stride 128 \
--max_answer_length 30 \
--overwrite_cache True \
--preprocessing_num_workers None \
\
--output_dir ../models/train_dataset \
--overwrite_output_dir True \
--do_train True \
--do_eval True \
--per_device_train_batch_size 8 \
--per_device_eval_batch_size 8 \
--learning_rate 5e-5 \
--weight_decay 0.0 \
--num_train_epochs 5.0 \
--warmup_ratio 0.0 \
--logging_steps 500 \
--save_steps 500 \
--seed 42
```

### 추론 방법
```bash
python inference.py \
--model_name_or_path ../models/train_dataset/ \
\
--dataset_name ../data/test_dataset/ \
--overwrite_cache True \
--max_seq_length 384 \
--pad_to_max_length False \
--doc_stride 128 \
--max_answer_length 30 \
--eval_retrieval True \
--num_clusters 64 \
--top_k_retrieval 20 \
--use_faiss False \
\
--output_dir code/outputs/test_dataset/ \
--overwrite_output_dir True \
--do_eval False \
--do_predict True \
--seed 42
```
Loading