Adaptive Invariance for Molecule Property Prediction