From a2eb29b4288e317fa773a19219bc52e8243e1fe8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20Scho=CC=88bel?= <56588215+lukaschoebel@users.noreply.github.com> Date: Wed, 9 Jun 2021 18:58:35 +0200 Subject: [PATCH] fixes warning in pumap about compatibiltity of tf-probability package (fixes #691) --- umap/parametric_umap.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/umap/parametric_umap.py b/umap/parametric_umap.py index b2694775..d1a78706 100644 --- a/umap/parametric_umap.py +++ b/umap/parametric_umap.py @@ -1,7 +1,6 @@ import numpy as np from umap import UMAP from warnings import warn, catch_warnings, filterwarnings -from umap.umap_ import make_epochs_per_sample from numba import TypingError import os from umap.spectral import spectral_layout @@ -44,7 +43,7 @@ import tensorflow_probability except ImportError: warn( - """ Global structure preservation in The umap.parametric_umap package requires + """ Global structure preservation in the umap.parametric_umap package requires tensorflow_probability to be installed. You can install tensorflow_probability at https://www.tensorflow.org/probability, @@ -52,6 +51,10 @@ pip install --upgrade tensorflow-probability + Please ensure to install a version which is compatible to your tensorflow + installation. You can verify the correct release at + https://github.com/tensorflow/probability/releases. + """ ) @@ -143,8 +146,8 @@ def __init__( self.global_correlation_loss_weight = global_correlation_loss_weight else: warn( - "tensorflow_probability not installed. \ - Setting global_correlation_loss_weight to zero." + "tensorflow_probability not installed or incompatible to current \ + tensorflow installation. Setting global_correlation_loss_weight to zero." ) self.global_correlation_loss_weight = 0