If your rest of the code is correct, then I guess you are working on the old version of the assignment. Course staff has updated this assignment in which you don’t need to mention training=training
for exercises 1 and 2. If you see that you have to specify this parameter, it’s time to get a fresh copy of your notebook as described here.