This is an interesting thread on the topic : https://stats.stackexchange.com/questions/213464/on-the-importance-of-the-i-i-d-assumption-in-statistical-learning
Some notes:
1) Method of cross validation changes based in i.i.d assumption.
- For time series we use one step ahead cross validation.
- Also in panel data when we have clustered structure we sample whole cluster to preserve shape of the data
2)

Looking at the last three equation, p(D/h) = p((d1, d2, d3)/h) can be reduced to multiplication only when d1, d2, d3 are independent.
