Fix spurious warning in TF TokenClassification models
This small fix switches `warnings.warn` for `tf.print` in the loss function for TF `TokenClassification` models. When TF compiles a model which has a conditional that depends on values inside a Tensor, it traces both branches. The result of this is that when one of the branches contains a `warnings.warn` statement, that warning is fired during tracing, before the model has seen any data.

Using `tf.print` instead of `warnings.warn` has a few downsides - in particular, it will possibly fire more than once. Still, this is better than firing the warning every time the model is used even if the data is correct, which is what happens now.
_The documentation is not available anymore as the PR was closed or merged._<|||||>I think if we use `FutureWarning` they are only printed once, no? Could you check in this instance @Rocketknight1 ?
<|||||>@sgugger Either `FutureWarning` or `warnings.warn` are correctly only printed once - the problem is that they are **always** printed once, even if there are no -1s in the labels! This is because TF compiles the branch of the graph where the labels tensor contains `-1` and fires the warning during tracing. Only a TF graph op (like `tf.print()`) is correctly fired if and only if the tensor contains `-1`.<|||||>Ah thanks for explaining! I had completely misunderstood :-)<|||||>Don't worry, even the TF engineers don't understand TF