Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Found array with dim 3. None expected <= 2. #46

Open
Luhuanz opened this issue Apr 21, 2024 · 1 comment
Open

Found array with dim 3. None expected <= 2. #46

Luhuanz opened this issue Apr 21, 2024 · 1 comment

Comments

@Luhuanz
Copy link

Luhuanz commented Apr 21, 2024

colab hugging face

@jiyzhang
Copy link

jiyzhang commented Dec 16, 2024

same issue.

code:

`
from ragxplorer import RAGxplorer

pdf_path = "./RAGxplorer/tutorials/nais2023.pdf"

client = RAGxplorer(embedding_model="nomic-embed-text")
client.load_pdf(document_path=pdf_path, verbose=True)
client.visualize_query(
"How will AI innovation be balanced with ethnical considerations and public trust?"
)
`

error:
/Users/macsmith/miniconda3/envs/lightrag/lib/python3.12/site-packages/sklearn/utils/deprecation.py:151: FutureWarning: 'force_all_finite' was renamed to 'ensure_all_finite' in 1.6 and will be removed in 1.8. warnings.warn( 99%|████████████████████████████████████████████████████████████████████████████████████████████████████████▉ | 94/95 [00:04<00:00, 27.37it/s]/Users/macsmith/miniconda3/envs/lightrag/lib/python3.12/site-packages/sklearn/utils/deprecation.py:151: FutureWarning: 'force_all_finite' was renamed to 'ensure_all_finite' in 1.6 and will be removed in 1.8. warnings.warn( 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████| 95/95 [00:04<00:00, 22.01it/s] Completed reducing dimensionality of embeddings ✓ 0%| | 0/1 [00:00<?, ?it/s]/Users/macsmith/miniconda3/envs/lightrag/lib/python3.12/site-packages/sklearn/utils/deprecation.py:151: FutureWarning: 'force_all_finite' was renamed to 'ensure_all_finite' in 1.6 and will be removed in 1.8. warnings.warn( 0%| | 0/1 [00:00<?, ?it/s] Traceback (most recent call last): File "/Users/macsmith/ML2/chroma_emb.py", line 15, in <module> client.visualize_query( File "/Users/macsmith/miniconda3/envs/lightrag/lib/python3.12/site-packages/ragxplorer/ragxplorer.py", line 167, in visualize_query self._query.original_query_projection = get_projections(embedding=[self._chosen_embedding_model(self._query.original_query)], ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/macsmith/miniconda3/envs/lightrag/lib/python3.12/site-packages/ragxplorer/projections.py", line 46, in get_projections projections = _project_embeddings(embedding, umap_transform) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/macsmith/miniconda3/envs/lightrag/lib/python3.12/site-packages/ragxplorer/projections.py", line 64, in _project_embeddings umap_embeddings[i] = umap_transform.transform([embedding]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/macsmith/miniconda3/envs/lightrag/lib/python3.12/site-packages/umap/umap_.py", line 2974, in transform X = check_array( ^^^^^^^^^^^^ File "/Users/macsmith/miniconda3/envs/lightrag/lib/python3.12/site-packages/sklearn/utils/validation.py", line 1101, in check_array raise ValueError( ValueError: Found array with dim 3. None expected <= 2.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants