Replace weigths API with more complete metrics API.