Amazing session but have just one doubt with purrr package functional approach. Here you are storing all the split - train/test, cv folds for all the categories and if the categories are like 30,40 or 100's instead of 3 categories then we are keeping split data for each category in the memory all the time. I guess this can be useful for parallel processing but otherwise when we are running things sequentially with good size data then i think for loop can help in overwrite previous category data and then save just the results instead. I am new to programming and functional programming so I may be wrong due to my limited knowledge.
I think for your example that makes sense especially when dealing with many nested datasets. One caveat to the cv folds is that rsample does some things in the background that reduces the memory overhead so it may not have that large of an impact. Thanks for watching!