Sampler now trains and writes out weights