> Why it doesn't raise a ValueError here if metric is not in warn_for?

This the way to disable warnings as you requested earlier isn't it?