Skip to content

Commit

Permalink
Fix guided topic modeling in cuML's UMAP (MaartenGr#1326)
Browse files Browse the repository at this point in the history
  • Loading branch information
stevetracvc authored Jul 11, 2023
1 parent 8e0e316 commit 68de971
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bertopic/_bertopic.py
Original file line number Diff line number Diff line change
Expand Up @@ -3180,6 +3180,8 @@ def _reduce_dimensionality(self,
# Regular fit
else:
try:
# cuml umap needs y to be an numpy array
y = np.array(y) if y is not None else None
self.umap_model.fit(embeddings, y=y)
except TypeError:
logger.info("The dimensionality reduction algorithm did not contain the `y` parameter and"
Expand Down

0 comments on commit 68de971

Please sign in to comment.