I would interpret this error as if not all models are trained, so the Models vector is too small.

Look into the training log: has it error messages?