Coder Social home page Coder Social logo

Comments (6)

nigh8w0lf avatar nigh8w0lf commented on July 19, 2024 1

I would recommend setting up and using your notebook through WSL.

from ragatouille.

bclavie avatar bclavie commented on July 19, 2024

Hey, please try wrapping your code in

if __name__ == "__main__":

aș per the README. This should do the trick, the issue is due to multiprocessing hanging.

from ragatouille.

bclavie avatar bclavie commented on July 19, 2024

Also please note -- I was just updating the README to give a better example where the collection is actually split into chunks! Do use this full code instead for a better demo:

from ragatouille import RAGPretrainedModel
from ragatouille.utils import get_wikipedia_page
from ragatouille.data import CorpusProcessor

if __name__ == "__main__":
    RAG = RAGPretrainedModel.from_pretrained("colbert-ir/colbertv2.0")
    my_documents = [get_wikipedia_page("Hayao_Miyazaki"), get_wikipedia_page("Studio_Ghibli")]
    processor = CorpusProcessor()
    my_documents = processor.process_corpus(my_documents)
    index_path = RAG.index(index_name="my_index", collection=my_documents)

from ragatouille.

shao-shuai avatar shao-shuai commented on July 19, 2024

Also please note -- I was just updating the README to give a better example where the collection is actually split into chunks! Do use this full code instead for a better demo:

from ragatouille import RAGPretrainedModel
from ragatouille.utils import get_wikipedia_page
from ragatouille.data import CorpusProcessor

if __name__ == "__main__":
    RAG = RAGPretrainedModel.from_pretrained("colbert-ir/colbertv2.0")
    my_documents = [get_wikipedia_page("Hayao_Miyazaki"), get_wikipedia_page("Studio_Ghibli")]
    processor = CorpusProcessor()
    my_documents = processor.process_corpus(my_documents)
    index_path = RAG.index(index_name="my_index", collection=my_documents)

thanks! Tried the new demo code (wrapped with 'if name == "main":' also) and still not working. Got stuck at the same place. I am running it in jupyte lab.

from ragatouille.

shao-shuai avatar shao-shuai commented on July 19, 2024

I would recommend setting up and using your notebook through WSL.

thanks, will give a try.

from ragatouille.

bclavie avatar bclavie commented on July 19, 2024

Oh my bad, I assumed this was ran in a script!

Yes, Windows support isn't something we're currently targeting. It appears to run well in notebooks on Windows 11 + WSL as per #14. Closing this issue to centralise windows-related hangups there!

from ragatouille.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    šŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. šŸ“ŠšŸ“ˆšŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ā¤ļø Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.