Coder Social home page Coder Social logo

Comments (2)

rahul-trip avatar rahul-trip commented on August 15, 2024

Analysis from the plugin side:

Problem at hand:
What should be the trigger to generate the report?
Earlier (In case of single loader) we used to send a flag, loading_end: bool.
Now with multiple document loaders we have the following scenarios:

1.
loader1 = PebbloSafeLoader(ABCDocumentLoader(abcpath), abcname, abcdescription, abcowner) #discocery
loader2 = PebbloSafeLoader(XYZDocumentLoader(xyzpath), xyzname, xyzdescription, xyzowner)
loader1.load() #classification
loader2.load()
2.
loader1 = PebbloSafeLoader(ABCDocumentLoader(abcpath), abcname, abcdescription, abcowner) #discocery
loader1.load() #classification
loader2 = PebbloSafeLoader(XYZDocumentLoader(xyzpath), xyzname, xyzdescription, xyzowner)
loader2.load()

Note: PebbloSafeLoader instantiation --> app:loader discovery, and it's .load() --> classifies the loaded data.

In 1st case we will get to know the first loader and then the 2nd loader, and then both loaders will be loaded (and their data classified) one by one (generating reports twice, on every loading_end = true from both the loaders).
But in 2nd case when the first loader is discovered and loaded just after its discovery and just before the discovery of 2nd loader, server will get loading_end = True (first loader) and report generation will get triggered, We need to make some adjustments here.

As of today, the pebblo server will generate the report with every new loading_end = true. the 2ne case mentioned above is a kind of race condition where we won't be able to get a trigger point to make sure the loading is actually over in an RAG app. Let's wait for a few seconds before generating the report, a new loader discovery might just kick in. Also, we generate(overwrite) a new report with every new loading_end=True

from pebblo.

shreyas-damle avatar shreyas-damle commented on August 15, 2024

In order to support multiple data sources, we need to update out folder structure within scratch space as follows:

.pebblo/
       /<app-name>/
                  /metadata/metadata.json             => app name and run_id to load_id mappings.
                                                         This file will be protected by file lock.
                  /<run-id>/
                           /metadata/metadata.json    => All the details needed to generate report.json.
                                                         This will include details for all successful loads.
                           /report.json               => This is input to reports module.
                                                         This will include details for all successful loads.
                           /pebblo_report.pdf         => Report pdf including details for all successful loads.
                  /<load-id>/
                           /metadata/metadata.json.   => All the details needed to generate report.json.
                                                         This will include details for all successful runs.
                                                         This is only for backward compatibility
                           /report.json               => This is input to reports module.
                                                         This will include details for all successful runs.
                                                         This is only for backward compatibility
                           /pebblo_report.pdf         => Report pdf including details for all successful runs.
                                                         This is only for backward compatibility

from pebblo.

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.