title: How to associate training data ID's when using Keras `Model.predict_generator`
body: <h1>Question</h1>
  
  <p>I have test data where each example contains a unique <code>id</code> as well as a number of features. If I use <a href="https://keras.io/models/model/#predict_generator" rel="nofollow noreferrer">Model.predict_generator</a>, then as one of the arguments I pass a generator that loads the data, this will successfully pass along the features of the test data to my model and will spit out predictions. However, I would like to also pass along my <code>id</code> property and have the predictions associated with the <code>id</code>s. The test data is too big to fit into memory.</p>
  
  <h1>Plausible Solution</h1>
  
  <p>I could read the data from the generator directly and instead feed it to <a href="https://keras.io/models/model/#predict" rel="nofollow noreferrer">Model.predict</a>. However, this feels like a workaround and I feel that this is something many people have also stumbled into.</p>