How do i generate compatible train and test sets that get processed with a filter

Running a filter twice, once with the train set as input and then the second time with the test set, will create almost certainly two incompatible files. Why is that? Every time you run a filter, it will get initialized based on the input data, and, of course, training and test set will differ, hence creating incompatible output. You can avoid this by using batch filtering. See the article on Batch filtering for more details.