"...git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "34bbf60bf85cad5ce48f67892b6b7d974561a347"
Commit 5565dcdd authored by Aymeric Augustin's avatar Aymeric Augustin
Browse files

Remove warning when scikit-learn isn't available.

Most users don't need it.
parent 23dad844
...@@ -14,18 +14,12 @@ ...@@ -14,18 +14,12 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import logging
logger = logging.getLogger(__name__)
try: try:
from scipy.stats import pearsonr, spearmanr from scipy.stats import pearsonr, spearmanr
from sklearn.metrics import matthews_corrcoef, f1_score from sklearn.metrics import matthews_corrcoef, f1_score
_has_sklearn = True _has_sklearn = True
except (AttributeError, ImportError) as e: except (AttributeError, ImportError) as e:
logger.warning("To use data.metrics please install scikit-learn. See https://scikit-learn.org/stable/index.html")
_has_sklearn = False _has_sklearn = False
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment