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

Support for asynchronous requests for watsonx.ai chat #1666

Merged
merged 7 commits into from
Mar 19, 2025

Conversation

pawelknes
Copy link
Collaborator

@pawelknes pawelknes commented Mar 10, 2025

Added support for asynchronous requests in the WMLInferenceEngineChat. The default concurrency limit is set to be the same as in the case of the WMLInferenceEngineGeneration: 10.

Small performance test (for the dataset at the bottom, averaged for 3 runs each):

  • old version: 31.2 seconds
  • new version (concurrency_limit=10): 6.4 seconds
dataset = load_dataset(
    card="cards.wnli",
    template_card_index=0,
    format="formats.chat_api",
    loader_limit=21,
)["test"]

@pawelknes pawelknes self-assigned this Mar 10, 2025
@yoavkatz
Copy link
Member

Looks good. I've merged to check it in my branch of testing. The unit tests are failing but might not be related. @elronbandel and @eladven are looking at it.

@pawelknes
Copy link
Collaborator Author

pawelknes commented Mar 11, 2025

@yoavkatz one error is related to the obsolete version of ibm-watsonx-ai(I've pushed a commit with the upgrade), the other is related to the test_lite_llm_inference_engine (it happened previously as well)

@pawelknes
Copy link
Collaborator Author

@yoavkatz one error is related to the obsolete version of ibm-watsonx-ai(I've pushed a commit with the upgrade), the other is related to the test_lite_llm_inference_engine (it happened previously as well)

I see the catalog consistency test failing as well but it seems to be an issue with HF

@pawelknes
Copy link
Collaborator Author

@yoavkatz
I see that the inference test keeps failing for LiteLLM tests with:
litellm.exceptions.APIConnectionError: litellm.APIConnectionError: WatsonxException - Client error '400 Bad Request' for url
I saw the same error already happening before, so I don't think it's related to the changes in this PR

@elronbandel elronbandel merged commit cdf5b82 into main Mar 19, 2025
21 of 27 checks passed
@elronbandel elronbandel deleted the wxai-async-chat branch March 19, 2025 09:03
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