Troubleshooting¶
Common issues and solutions for StringSight.
Installation Issues¶
"No module named 'stringsight'"¶
Solution:
PyTorch/CUDA Errors¶
Solution:
Node.js Version Issues¶
Solution:
Runtime Issues¶
"OpenAI API key not found"¶
Solution:
export OPENAI_API_KEY="your-api-key-here"
# Or create .env file
echo "OPENAI_API_KEY=your-api-key-here" > .env
"Clustering produced no valid clusters"¶
Causes: - Dataset too small - min_cluster_size too large - Properties too similar/dissimilar
Solutions:
# Reduce cluster size threshold
explain(df, min_cluster_size=5)
# Use more data (minimum 20-50 conversations recommended)
# Try different embedding model
explain(df, embedding_model="all-MiniLM-L6-v2")
Out of Memory Errors¶
Solutions:
# Use local embeddings
explain(df, embedding_model="all-MiniLM-L6-v2")
# Disable embeddings in output
explain(df, include_embeddings=False)
# Increase cluster size
explain(df, min_cluster_size=50)
# Process in batches
for chunk in pd.read_csv("data.csv", chunksize=1000):
explain(chunk, output_dir="results/batch")
Frontend Issues¶
Port Already in Use¶
Solution:
# Kill process
lsof -ti:8000 | xargs kill -9
lsof -ti:5173 | xargs kill -9
# Or use different port
python -m uvicorn stringsight.api:app --port 8001
CORS Errors¶
Solution: Check stringsight/api.py CORS configuration includes your frontend URL.
Frontend Won't Start¶
Solution:
Data Issues¶
"Missing required column"¶
Solution:
# Check columns
print(df.columns.tolist())
# Rename if needed
df = df.rename(columns={'response': 'model_response'})
"Invalid response format"¶
Solution:
Score Column Not Recognized¶
Solution:
Performance Issues¶
Slow Extraction¶
Solutions:
# Use faster model
explain(df, model_name="gpt-4.1-mini")
# Increase parallelism
explain(df, max_workers=32)
# Enable caching
explain(df, extraction_cache_dir=".cache/extraction")
Slow Clustering¶
Solutions:
# Use local embeddings
explain(df, embedding_model="all-MiniLM-L6-v2")
# Disable dimensionality reduction
from stringsight.clusterers import HDBSCANClusterer
clusterer = HDBSCANClusterer(disable_dim_reduction=True)
Getting Help¶
- GitHub Issues: Report bugs
- Documentation: Read the docs
- Logs: Check console output for error details