ch07 fixes (#204)

* updated .gitginore for ch07

* fixed extract_response()
This commit is contained in:
Daniel Kleine 2024-06-11 00:31:13 +02:00 committed by GitHub
parent 888ce71796
commit da9f64215a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 1 deletions

4
.gitignore vendored
View File

@ -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

View File

@ -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:]"
]
},