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

Low performance hotspots #1160

Open
wants to merge 586 commits into
base: main
Choose a base branch
from
Open

Conversation

bodhisaha
Copy link

Secondary pull request without Open AI that adds the notebook that analyzes topic hotspots given the topics, as well as the pages on streamline to display this analysis.

Use case - supervised query classification and analysis.

epinzur and others added 30 commits December 20, 2023 11:38
* exposed AzureOpenAI provider

* added docs

* Update CONTRIBUTING.md

* typo in mkdocs.yml

---------

Co-authored-by: Josh Reini <60949774+joshreini1@users.noreply.github.com>
* import llama only if needed

* use optional imports instead

---------

Co-authored-by: Piotr Mardziel <piotrm@gmail.com>
* fix

* typo

* don't print external if internal is available
Co-authored-by: Piotr Mardziel <piotrm@gmail.com>
* adjust docstring for select_context

* langchain select_context, update quickstarts

* undo app name change

* remove dev cell

* generalized langchain select_context (truera#711)

* generalized langchain select_context

* typo

* typo in string

* update langchain example to pass app in select_context

---------

Co-authored-by: Josh Reini <joshreini1@gmail.com>

* comments, clarity updates to quickstarts

* add lib-independent select_context

* update lc li quickstarts

---------

Co-authored-by: Piotr Mardziel <piotrm@gmail.com>
* add optional

* bug class_info fix
* update configs

* bugfix

* dont add class info to dicts
* Fix correctness prompt

Fixes truera#718

* Update base.py
* Bump suggested notebook versions

* Combine notebooks and py files

---------

Co-authored-by: Shayak Sen <shayak@truera.com>
* Bump suggested notebook versions

* Combine notebooks and py files

* Update __init__.py

---------

Co-authored-by: Shayak Sen <shayak@truera.com>
* debug

* display python version

* python version

* PromptTemplate update import

* bad escape fix

* add msg to exception

* pass kwargs in Groundedness

* pass kwargs with GroundTruthAgreement

* give default value to ground_truth_imp

* migrate db on reset
* fix example notebook

* fixes

* remove commented out
* always use prompt instead of messages

* use messages in base

* use prompt in bedrock

* move score to top of cot template, request entire template be used

* remove dev

* add TODO
* update langchain instrumentation page

* include instrumented methods

* llama-index instrumentation updates

* update the overview

* change path to instrumentation overview

* add some more info in appendices and line space

---------

Co-authored-by: Piotr Mardziel <piotrm@gmail.com>
* add instructions and text wrapping

* format

* clean up github scripts and update README sources

* typo

---------

Co-authored-by: Josh Reini <60949774+joshreini1@users.noreply.github.com>
Co-authored-by: joshreini1 <joshreini1@users.noreply.github.com>
* fix

* remove redundant

---------

Co-authored-by: Josh Reini <60949774+joshreini1@users.noreply.github.com>
Co-authored-by: joshreini1 <joshreini1@users.noreply.github.com>
* add instructions and text wrapping

* format

* debugging

* making obj arg no longer required

* remove obj and add documentation for WithClassInfo

* remove IPython from most notebooks and organize imports

* fix test errors

* forgot warning

---------

Co-authored-by: Josh Reini <60949774+joshreini1@users.noreply.github.com>
* update notebooks to test

* rehack

* update langchain requirement

* add core lowerbound
* fix instance check on generic types

* remove original check

---------

Co-authored-by: Piotr Mardziel <piotrm@gmail.com>
* check for langchain legacy

* few more

* typo

* rephrase

* rephrase
* pass bedrock provider to ground truth eval

* Update bedrock_finetuning_experiments.ipynb

---------

Co-authored-by: Piotr Mardziel <piotrm@gmail.com>
* first

* temp format

* minor

* more notes

* minor fixes
eltociear and others added 18 commits May 14, 2024 13:31
retreivers -> retrievers
* unify groundedness start

* remove groundedness.py

* groundedness nli moves

* remove custom aggregator

* groundedness aggregator to user code

* move agg to trulens side by default (groundedness)

* remove extra code

* remove hf key setting

* remove hf import

* add comment about aggregation for context relevance

* update init

* remove unneeded import

* use generate_score_and_reasons for groundedness internally

* f-strings for groundedness prompts

* docstring

* docstrings formatting

* groundedness reasons template

* remove redundant prompt

* update quickstarts

* llama-index notebooks

* rag triad helper update

* oai assistant nb

* update readme

* models notebooks updates

* iterate nbs

* mongo, pinecone nbs

* update huggingface docstring

* remove outdated docstring selector notes

* more docstring cleaning
* open ai streaming adjustments in cost tracking

* notes

* delete outputs
Co-authored-by: joshreini1 <joshreini1@users.noreply.github.com>
Co-authored-by: Josh Reini <60949774+joshreini1@users.noreply.github.com>
* Update selecting_components.md

* Update MultiQueryRetrievalLangchain.ipynb

* Update random_evaluation.ipynb

* Update canopy_quickstart.ipynb
Co-authored-by: joshreini1 <joshreini1@users.noreply.github.com>
* update comprehensiveness + nb

* nb expansion

* fix typo

* meetingbank transcript data

* oss models in app

* test

* benchmarking gpt-3.5-turbo, gpt-4-turbo, and gpt-4o

* update path

* comprehensiveness benchmark

* updated summarization_eval nb

* fix normalization

* show improvement in comprehensiveness feedback functions

---------

Co-authored-by: Daniel <dah0417912@gmail.com>
* version bump

* simpler lc quickstart

* update installs and imports

* update langchain instrumentation docs

* remove groundedness ref from providers.md

* build docs fixes

* remove key cell

* fix docs build

* firx formatting for stock.md

* remove extra spaces

* undo format change

* update docstrings for hugs and base provider

* openai docstring updates

* hugs docstring update

* update context relevance hugs docstring

* more docstring updates

* remove can be changed messages from openai provider docstrings
Co-authored-by: joshreini1 <joshreini1@users.noreply.github.com>
* add to glossary

* finish some terms
* add httpx to requirements

* undo httpx add

* test add langchain-community

* change langchain-community required version
…nai endpoint (truera#1154)

* first

* adjust docs

* logic

* add langhain_community to pinecone reqs too

* adjust trubot example with new reqs

* more reqs

* remove extra text

* add langchain_community to a few imports in notebooks

---------

Co-authored-by: Piotr Mardziel <piotrm@Piotrs-Laptop.local>
Co-authored-by: Josh Reini <60949774+joshreini1@users.noreply.github.com>
Co-authored-by: Josh Reini <joshua.reini@snowflake.com>
Co-authored-by: Josh Reini <joshua.reini@snowflake.com>
@dosubot dosubot bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label May 25, 2024
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@@ -0,0 +1,13086 @@
{
Copy link
Contributor

@joshreini1 joshreini1 May 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you remove the category generation from this demo notebook?


Reply via ReviewNB

@@ -0,0 +1,13086 @@
{
Copy link
Contributor

@joshreini1 joshreini1 May 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clear the output here


Reply via ReviewNB

@@ -0,0 +1,13086 @@
{
Copy link
Contributor

@joshreini1 joshreini1 May 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

anything specific to this change you're trying to show here? otherwise delete


Reply via ReviewNB

@@ -0,0 +1,13086 @@
{
Copy link
Contributor

@joshreini1 joshreini1 May 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move to the top or delete


Reply via ReviewNB

@@ -0,0 +1,13086 @@
{
Copy link
Contributor

@joshreini1 joshreini1 May 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove output


Reply via ReviewNB

@@ -0,0 +1,13086 @@
{
Copy link
Contributor

@joshreini1 joshreini1 May 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you streamline this setup? The key point to get across to the reader is that they need to bring their own record metadata (the title here) and then your change finds hotspots for them.


Reply via ReviewNB

@joshreini1
Copy link
Contributor

joshreini1 commented May 29, 2024

Can you focus this change on the hotspots and drop the category and topic analysis pages?

For the UI, this could probably use some design thoughts - @walnutdust can you give some feedback here?

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:XL This PR changes 500-999 lines, ignoring generated files. labels May 30, 2024
@joshreini1 joshreini1 changed the title Added the additional hotspot analysis pages and the notebook to rende… Low performance hotspots May 31, 2024
@sfc-gh-pdharmana
Copy link
Contributor

Hey @bodhisaha are you still working on this?

@bodhisaha
Copy link
Author

bodhisaha commented Aug 6, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.