Skip to content

Commit

Permalink
Updated the serialisation function for CSV (aws#3580)
Browse files Browse the repository at this point in the history
Fixed string formatting issue for inference
  • Loading branch information
duk-amz authored Aug 27, 2022
1 parent 6ccaf6c commit e75876c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1130,7 +1130,7 @@
"data = data.drop(\"medianHouseValue\", axis=1)\n",
"\n",
"pred_count = 10\n",
"payload = data.iloc[:pred_count].to_string(header=False, index=False).replace(\" \", \",\")\n",
"payload = data.iloc[:pred_count].to_csv(header=False, index=False)\n",
"p = predictor.predict(payload, initial_args={\"ContentType\": \"text/csv\"})\n",
"print(p.decode(\"utf-8\"))"
]
Expand Down Expand Up @@ -1231,4 +1231,4 @@
},
"nbformat": 4,
"nbformat_minor": 4
}
}

0 comments on commit e75876c

Please sign in to comment.