Skip to content

Commit

Permalink
Merge pull request #692 from lukaschoebel/tf-probability-warning
Browse files Browse the repository at this point in the history
fixes warning in pumap about compatibiltity of tf-probability package…
  • Loading branch information
lmcinnes authored Jun 10, 2021
2 parents 0865ef1 + a2eb29b commit de88b39
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions umap/parametric_umap.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -44,14 +43,18 @@
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,
or via
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.
"""
)

Expand Down Expand Up @@ -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

Expand Down

0 comments on commit de88b39

Please sign in to comment.