Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Error training on new docs #31

Closed
pshriwise opened this issue Feb 6, 2023 · 6 comments
Closed

Error training on new docs #31

pshriwise opened this issue Feb 6, 2023 · 6 comments
Assignees
Labels
good first issue Good for newcomers

Comments

@pshriwise
Copy link
Contributor

Getting this error out of the gate when trying to train on a single new .rst file. Any thoughts?

Traceback (most recent call last):
  File "/home/pshriwise/soft/doc-gpt/docsgpt/scripts/ingest_rst.py", line 36, in <module>
    store = FAISS.from_texts(docs, OpenAIEmbeddings(), metadatas=metadatas)
  File "/home/pshriwise/.pyenv/versions/3.9.1/lib/python3.9/site-packages/langchain/vectorstores/faiss.py", line 192, in from_texts
    index = faiss.IndexFlatL2(len(embeddings[0]))
IndexError: list index out of range
@dartpain dartpain added the good first issue Good for newcomers label Feb 6, 2023
@bil0u
Copy link

bil0u commented Feb 6, 2023

@pshriwise Could you provide the .rst file that causes the error?

@pshriwise
Copy link
Contributor Author

@jaredbradley243 jaredbradley243 self-assigned this Feb 7, 2023
@jaredbradley243
Copy link
Collaborator

@pshriwise Hey Patrick,

If you haven't already, create a folder named "scikit-learn" inside the "scripts" folder and toss your index.rst inside of it. That should fix your problem.

You can really name the folder anything you would like, just make sure it matches the path in the ingest_rst.py and ingest_rst_sphinx.py files:

ps = list(Path("<FolderName>").glob("**/*.rst"))

image

@jaredbradley243
Copy link
Collaborator

Let me know if that works for you so I can close the issue. :)

@pshriwise
Copy link
Contributor Author

It did. Thanks! I appreciate the help!

@jaredbradley243
Copy link
Collaborator

No problem! Glad to help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants