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

Wait for all futures #6554

Merged
merged 3 commits into from
Jun 22, 2023
Merged

Wait for all futures #6554

merged 3 commits into from
Jun 22, 2023

Conversation

vowelparrot
Copy link
Contributor

  • Expose method to wait for all futures
  • Wait for submissions in the run_on_dataset functions to ensure runs are fully submitted before cleaning up

@vercel
Copy link

vercel bot commented Jun 21, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
langchain ⬜️ Ignored (Inspect) Jun 21, 2023 6:44pm


def wait_for_futures(self) -> None:
"""Wait for the given futures to complete."""
wait(self._futures)
Copy link
Collaborator

Choose a reason for hiding this comment

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

it's better to do something like

futures = [*self._futures]
wait(futures)
for future in futures:
  # remove from self ._futures
  

in case other futures are added here while you're waiting?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point

@vowelparrot vowelparrot merged commit 5322bac into master Jun 22, 2023
@vowelparrot vowelparrot deleted the vwp/wait_all branch June 22, 2023 01:20
tconkling added a commit to tconkling/langchain that referenced this pull request Jun 22, 2023
* master:
  MD header text splitter returns Documents (langchain-ai#6571)
  Fix callback forwarding in async plan method for OpenAI function agent (langchain-ai#6584)
  bump 209 (langchain-ai#6593)
  Clarifai integration (langchain-ai#5954)
  Add missing word in comment (langchain-ai#6587)
  Add AzureML endpoint LLM wrapper (langchain-ai#6580)
  Add OpenLLM wrapper(langchain-ai#6578)
  feat: interfaces for async embeddings, implement async openai (langchain-ai#6563)
  Upgrade the version of AwaDB and add some new interfaces (langchain-ai#6565)
  add motherduck docs (langchain-ai#6572)
  Detailed using the Twilio tool to send messages with 3rd party apps incl. WhatsApp (langchain-ai#6562)
  Change Data Loader Namespace (langchain-ai#6568)
  Remove duplicate databricks entries in ecosystem integrations (langchain-ai#6569)
  Fix whatsappchatloader - enable parsing new datetime format on WhatsApp chat (langchain-ai#6555)
  Wait for all futures (langchain-ai#6554)
  feat: faiss filter from list (langchain-ai#6537)
  update pr tmpl (langchain-ai#6552)
  Remove unintended double negation in docstring (langchain-ai#6541)
  Minor Grammar Fixes in Docs and Comments (langchain-ai#6536)
This was referenced Jun 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants