My Attempt to Use ChatGPT to Produce an AWS SageMaker Image Classifier

My journey with ChatGPT through 15 prompts with 15 interesting answers

David Hundley
15 min readDec 14, 2022


Graphic created by author with AWS SageMaker icon in center

Needless to say, ChatGPT is the hottest topic in the AI/ML world right now. Many people have used it forU more benign cases to produce some very interesting results, so I thought I’d try to see if I could use ChatGPT in a “real world” business scenario. More specifically, I wanted to see if I could get ChatGPT to write me code that would produce an image classifier that I could use specifically with Amazon’s machine learning AWS service, AWS SageMaker. In a very short test I did via this tweet, I came into this experiment hoping it would go very well.

Spoiler alert: It didn’t.

To be fair, I didn’t walk into this experiment thinking it would go 100% perfectly. After all, I know ChatGPT is limited to only producing generic code, so I knew that I was going to have to make minor alterations to the code to fit a more specific, real world use case. The biggest problem I kept running into with ChatGPT is that it didn’t want to handle “larger” requests. For example, if I ask it to produce a full script for me all at once via a single prompt, it crashes like so:

Screenshot of ChatGPT captured by the author

This wasn’t just a fluke. I tried rewording this more complex prompt a number of different ways, and every single time, ChatGPT would unfortunately fail out on me. When I searched online why this is occurring, other users noted that ChatGPT tends to time out on larger requests. I can’t demonstrate this here in this post but ChatGPT would actually begin to write the code for me, but halfway between into writing the script, I would inevitably run into that same error above.

These same users online noted that if you broke your requests down into smaller chunks, ChatGPT would fare much better. While I did still see that “Load failed” error from time to time, I was able to successfully make it to the end after 15 prompts.

This post is going to be long, so let’s set the table for how to best read this. I break this post into three primary sections: Use



David Hundley

Principal machine learning engineer at a Fortune 50 company, 5x AWS certified, 2x HashiCorp certified, 1x GCP certified, M.A. in Org Leadership, PMP, ChFC, CSM