# Why would somebody use a hash function for creating a test/train split instead of random seed?

I'm going through some ML training material from Google (I can't post a link because I'm getting the material through my company).

In the part about how to extract data and split it into train and test sets, they're using a hash function on one of the data fields to provide a deterministic and repeatable test/train split instead of a random one.

But can't the same thing be accomplished with a random.seed function?

Moreover, using a hash function would mean we can no longer use the field on which the hash was generated (which might be potentially useful for a model) or it might be inserting some unknown bias into the model?

What advantage does using a hash function have over using random seed?

Sampling is less straight forward when you can't fit the entire dataset in memory. In the context of a DBMS, this article suggests that using RAND() with a seed may not be reproducible when writing SQL. This is due to the multithreaded nature of the application, which does not guarantee the order of the returned items (unless you add the ORDER BY clause, which might be expensive). The author of the article proceeds by hashing one of the date fields in each row to get around this problem.