Read sampler from attributes.