-
Notifications
You must be signed in to change notification settings - Fork 150
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
async handling adjustments #918
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dosubot
bot
added
the
size:XL
This PR changes 500-999 lines, ignoring generated files.
label
Feb 21, 2024
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
dosubot
bot
added
size:XXL
This PR changes 1000+ lines, ignoring generated files.
and removed
size:XL
This PR changes 500-999 lines, ignoring generated files.
labels
Feb 22, 2024
joshreini1
approved these changes
Feb 22, 2024
Josephrp
pushed a commit
to Josephrp/trulens
that referenced
this pull request
Feb 23, 2024
* adding cost tracking tests and cost tracking with litellm * move endpoint cost tests outside of unit tests folder * adjust docs parameters * finishing bedrock issues and moved around some tests check packages on init (truera#917) * add check imports * nits Increase provider test coverage to Huggingface feedback provider (truera#919) upgrade Llama-Index integration to 0.10 (truera#891) * upgrade tru_llama * Update tru_llama.py * fix indent * optional imports * migrate to 0.10 * trullama docstring * change data load to dir reader in test * more import changes * update create_llama * shrink async test * test response text from object * ignore output in json assert * simplify langchain prompts * cost tracking tests and litellm cost tracking (truera#910) * adding cost tracking tests and cost tracking with litellm * move endpoint cost tests outside of unit tests folder * adjust docs parameters * finishing bedrock issues and moved around some tests * Update tru_llama.py * framework-llama-notebook imports * import lines llama * pinecone quickstart llama update * updage agents notebook * llama version update * missed import changes * more import changes --------- Co-authored-by: Piotr Mardziel <piotrm@gmail.com> Automated File Generation from Docs Notebook Changes (truera#922) Co-authored-by: joshreini1 <joshreini1@users.noreply.github.com> Update issue templates (truera#923) * Update issue templates * Update bug-report.md * Update feature_request.md adding notebook explanations async handling adjustments (truera#918) * working * adjuting async wrapping to produce a record before final result is ready * docs and finish awaitable wrapping * clear notebook * nits and docs * typo * fix bug in prior pr * update streamlit version lower bound * format * fixing up docs * add integration tests to release pipeline * fix job name * adjust pipeline config * fixing up tests * fixes and don't run db integration tests * update some llama index imports * address migration error in release pipeline * fix makefile * add another llama index package bearer
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adjusted handling of wrapped async methods so that a record is added to the database with placeholder values and then updated once the async computation is done. Example using
rag_chain
oflangchain_quickstart.ipynb
:Output:
But once we do:
The record gets updated so the same main output printout is as expected:
Presently this only works if the whole output of the wrapped function is the awaitable, it will not work if the awaitable is hidden inside the return somewhere.
Also refactored some async methods to not rely on the sync/desync utility which should reduce the number of "coroutine already awaited" errors.