Solved by Sanjan_Das in post #2 
              
              
                You technically only need the y_pred, y_true and labels to calculate the F1 score as per scikit-learn's F1 score documentation. You really don’t need anything else from your 5-10 GB dataset. 
Perhaps I’ve misunderstood what you’re trying to do, in which case, could you give a bit more detail on what…