Do not set sample_weights unless need to.

Fixes #2126.
Add warning when fall back to other solver.