More troubleshooting and setup tips, and some improvements to flagship Week 8 project

This commit is contained in:
Edward Donner
2024-10-20 15:24:40 -04:00
parent ced435c95a
commit 0a64893188
10 changed files with 247 additions and 187 deletions

View File

@@ -145,7 +145,7 @@
"# Write the test set to a CSV\n",
"\n",
"import csv\n",
"with open('human_input.csv', 'w') as csvfile:\n",
"with open('human_input.csv', 'w', encoding=\"utf-8\") as csvfile:\n",
" writer = csv.writer(csvfile)\n",
" for t in test[:250]:\n",
" writer.writerow([t.test_prompt(), 0])"
@@ -161,7 +161,7 @@
"# Read it back in\n",
"\n",
"human_predictions = []\n",
"with open('human_output.csv', 'r') as csvfile:\n",
"with open('human_output.csv', 'r', encoding=\"utf-8\") as csvfile:\n",
" reader = csv.reader(csvfile)\n",
" for row in reader:\n",
" human_predictions.append(float(row[1]))"