Why am I getting error 'The Session graph is empty. Add operations to the graph before calling run().'?

Welcome to the community.

I think you are working on the old assignment which is Tensorflow v1 based.
V2 is basically running in the Eager execution mode that you can debug easily.

Not sure how you get the old one, but it is better for you to refresh to the new one.
This thread by Paul will help you on this.