From de42ad3d3284f1a4953e1c9a6470e38d0430676f Mon Sep 17 00:00:00 2001 From: Tom Denton Date: Wed, 18 Sep 2024 10:26:08 -0700 Subject: [PATCH] Fix call density test in external codebase. PiperOrigin-RevId: 676041630 --- chirp/inference/tests/call_density_test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chirp/inference/tests/call_density_test.py b/chirp/inference/tests/call_density_test.py index 38019949..ed3d5dd0 100644 --- a/chirp/inference/tests/call_density_test.py +++ b/chirp/inference/tests/call_density_test.py @@ -23,7 +23,7 @@ from chirp.inference import call_density from etils import epath import numpy as np -import sklearn +from sklearn import metrics from absl.testing import absltest @@ -116,7 +116,7 @@ def test_estimate_roc_auc(self): noise_scores = np.random.normal(size=num_samples) labels = np.random.randint(0, 2, size=num_samples) scores = noise_mu * noise_scores + (1 - noise_mu) * labels - gt_roc_auc = sklearn.metrics.roc_auc_score(labels, scores) + gt_roc_auc = metrics.roc_auc_score(labels, scores) # Generate some validation examples. quantile_bounds = np.array([0.0, 0.5, 0.75, 0.825, 1.0])