Skip to content

Commit

Permalink
chore: modify running code
Browse files Browse the repository at this point in the history
  • Loading branch information
presto105 committed Dec 8, 2021
1 parent 9ab3112 commit aacffe4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
18 changes: 13 additions & 5 deletions running.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
## 변경사항: 법률 데이터 미포함, 데이터셋 비율 50%, 정리를 위한 wandb project 변경

## Train
## 시도해볼 부분: epoch 수정해보기
## 변경 필요한 arguments: output_dir
python train.py \
--do_train \
--output_dir model/kobart_bV1 \
--output_dir model/baseV1.0_Kobart \
--dataset_name paper,news,magazine \
--num_train_epochs 3 \
--learning_rate 3e-05 \
Expand All @@ -14,17 +16,23 @@ python train.py \
--es_patience 3 \
--load_best_model_at_end True \
--relative_sample_ratio 0.5 \
--project_name Kobart_bV1.0 \
--project_name baseV1.0_Kobart \
--wandb_unique_tag kobartV1_ep2_lr3e05_len1024_R50

## Eval
# ## 시도해볼 부분: num_beams
# ## 변경 필요한 model_name_or_path: output_dir
# python train.py \
# --do_eval \
# --model_name_or_path model/kobart_bV1 \
# --model_name_or_path model/baseV1.0_Kobart \
# --dataset_name paper,news,magazine \
# --output_dir evaluation/kobart_eval \
# --num_beams 3 \
# --relative_sample_ratio 1 \
# --project_name Kobart_bV1.0 \
# --wandb_unique_tag Eval_kobartV1_ep2_lr3e05_len1024_R50
# --project_name baseV1.0_Kobart \
# --wandb_unique_tag Eval_kobartV1_ep2_lr3e05_len1024_R50

# ## Predict
# python predict.py \
# --model_name_or_path baseV1.0_Kobart \
# --num_beams 3
2 changes: 1 addition & 1 deletion train.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def main():

train_dataset = train_dataset.shuffle(training_args.seed)
valid_dataset = valid_dataset.shuffle(training_args.seed)
print('** Dataset example', train_dataset[0]['title'], train_dataset[0]['title'], sep = '\n')
print('** Dataset example', train_dataset[0]['title'], train_dataset[1]['title'], sep = '\n')

column_names = train_dataset.column_names
if data_args.relative_eval_steps :
Expand Down

0 comments on commit aacffe4

Please sign in to comment.