hun3359 commited on
Commit
eabd528
·
1 Parent(s): 27a91fc

update training code

Browse files
Files changed (1) hide show
  1. fine_tuning.ipynb +0 -25
fine_tuning.ipynb CHANGED
@@ -664,27 +664,6 @@
664
  "### Training Config"
665
  ]
666
  },
667
- {
668
- "cell_type": "code",
669
- "execution_count": 20,
670
- "metadata": {},
671
- "outputs": [
672
- {
673
- "name": "stderr",
674
- "output_type": "stream",
675
- "text": [
676
- "/opt/conda/envs/pytorch/lib/python3.10/site-packages/transformers/optimization.py:411: FutureWarning: This implementation of AdamW is deprecated and will be removed in a future version. Use the PyTorch implementation torch.optim.AdamW instead, or set `no_deprecation_warning=True` to disable this warning\n",
677
- " warnings.warn(\n"
678
- ]
679
- }
680
- ],
681
- "source": [
682
- "from transformers import AdamW, get_linear_schedule_with_warmup\n",
683
- "optimizer= AdamW(model.parameters(), \n",
684
- " lr=2e-5, \n",
685
- " eps=1e-8)\n"
686
- ]
687
- },
688
  {
689
  "cell_type": "code",
690
  "execution_count": 24,
@@ -700,13 +679,9 @@
700
  ],
701
  "source": [
702
  "from transformers import Trainer, TrainingArguments\n",
703
- "from transformers import get_linear_schedule_with_warmup\n",
704
  "\n",
705
  "batch_size = 32\n",
706
  "epoch = 5\n",
707
- "num_steps = (len(data['train']) // batch_size) * epoch\n",
708
- "warmup_steps = num_steps * 0.1\n",
709
- "print(num_steps)\n",
710
  "\n",
711
  "training_args = TrainingArguments(\n",
712
  " output_dir=\"/home/ubuntu/klue-bert-base-sentiment/ckpt\",\n",
 
664
  "### Training Config"
665
  ]
666
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
667
  {
668
  "cell_type": "code",
669
  "execution_count": 24,
 
679
  ],
680
  "source": [
681
  "from transformers import Trainer, TrainingArguments\n",
 
682
  "\n",
683
  "batch_size = 32\n",
684
  "epoch = 5\n",
 
 
 
685
  "\n",
686
  "training_args = TrainingArguments(\n",
687
  " output_dir=\"/home/ubuntu/klue-bert-base-sentiment/ckpt\",\n",