That probably means you are hard-coding the number of iterations when you call optimize from model. It’s important to understand how “named parameters” work in python. Defining a function is a completely different thing than calling a function. You can’t just “copy/paste” the definition of the function when you want to call it.
You can examine the actual test function by clicking File -> Open and opening the file public_tests.py. What value does that test use for the number of iterations? Note that it is not 2000. So why did you end up with 2000?
The named parameter with set value in a function definition refers to the default value to be used if none is given when making a call to that function.
So if you made a call to the model() function without passing num_iterations as a parameter, then the execution of the model() function would take the default value of 2000.