> permuted_ols calls _permuted_ols_on_chunk on different chunks and, as far as I
> understand, the random_state has to be the same for all chunks, because you
> have to do the exact same permutations each time.

OK, but then you do not want to implement it this way: it is too fragile.
Suppose you have numerical instabilities in the random number generator,
you'll get different streams. One should never rely on the fact that a
random number generator gives you a constant stream for the validity of
an algorithm.

Solution: pass the permutation as an argument to your function, instead
of the seed.