From da9f64215a3b1e6cba91bc24e6ca6356947c136c Mon Sep 17 00:00:00 2001 From: Daniel Kleine <53251018+d-kleine@users.noreply.github.com> Date: Tue, 11 Jun 2024 00:31:13 +0200 Subject: [PATCH] ch07 fixes (#204) * updated .gitginore for ch07 * fixed extract_response() --- .gitignore | 4 ++++ ch07/01_main-chapter-code/ch07.ipynb | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 47ed773..bfad8c6 100644 --- a/.gitignore +++ b/.gitignore @@ -16,6 +16,8 @@ ch05/01_main-chapter-code/the-verdict.txt ch06/01_main-chapter-code/loss-plot.pdf ch06/01_main-chapter-code/accuracy-plot.pdf +ch07/01_main-chapter-code/loss-plot.pdf + # Checkpoint files appendix-A/01_main-chapter-code/model.pth appendix-E/01_main-chapter-code/gpt2 @@ -30,6 +32,8 @@ ch06/01_main-chapter-code/gpt2 ch06/02_bonus_additional-experiments/gpt2 ch06/03_bonus_imdb-classification/gpt2 +ch07/01_main-chapter-code/gpt2-medium355M-sft.pth + # Datasets appendix-E/01_main-chapter-code/sms_spam_collection.zip appendix-E/01_main-chapter-code/sms_spam_collection diff --git a/ch07/01_main-chapter-code/ch07.ipynb b/ch07/01_main-chapter-code/ch07.ipynb index 59917ed..65acf60 100644 --- a/ch07/01_main-chapter-code/ch07.ipynb +++ b/ch07/01_main-chapter-code/ch07.ipynb @@ -1283,7 +1283,7 @@ }, "outputs": [], "source": [ - "def extract_response(response_text):\n", + "def extract_response(response):\n", " return response[response.find(\"\\n### Response\")+len(\"\\n### Response:\")+1:]" ] },