Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions ci/test_wheel_integrations.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# SPDX-FileCopyrightText: Copyright (c) 2025, NVIDIA CORPORATION.
# SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION.
# SPDX-License-Identifier: Apache-2.0

set -euo pipefail
Expand Down Expand Up @@ -45,11 +45,22 @@ timeout 20m python -c "
import warnings
warnings.filterwarnings('ignore')

import random
from bertopic import BERTopic
from sklearn.datasets import fetch_20newsgroups

# Create a small sample dataset
docs = fetch_20newsgroups(subset='train', categories=['sci.space'])['data'][:100]
# Generate synthetic documents with topic-like word clusters
random.seed(42)
topics = [
['star', 'galaxy', 'planet', 'orbit', 'telescope', 'nasa', 'astronaut'],
['rocket', 'launch', 'satellite', 'mission', 'space', 'shuttle', 'station'],
['moon', 'mars', 'jupiter', 'asteroid', 'comet', 'meteor', 'crater'],
]

docs = []
for i in range(100):
topic_words = topics[i % len(topics)]
doc = ' '.join(random.choices(topic_words, k=random.randint(10, 30)))
docs.append(doc)

# Initialize BERTopic with cuML UMAP backend
# BERTopic will automatically use cuML's UMAP if available
Expand Down