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

Add concurency_limit parameter to WMLInferenceEngine #1231

Merged
merged 2 commits into from
Sep 24, 2024

Conversation

elronbandel
Copy link
Member

@elronbandel elronbandel commented Sep 24, 2024

Closes: #1215

Signed-off-by: elronbandel <elronbandel@gmail.com>
@allyssonf
Copy link
Contributor

@elronbandel , looks good to me. But is it possible to update the documentation adding this new parameter?

class WMLInferenceEngine(
    InferenceEngine, WMLInferenceEngineParamsMixin, PackageRequirementsMixin
):
    """Runs inference using ibm-watsonx-ai.

    Attributes:
        credentials (Dict[str, str], optional): By default, it is created by a class
            instance which tries to retrieve proper environment variables
            ("WML_URL", "WML_PROJECT_ID", "WML_APIKEY"). However, a dictionary with
            the following keys: "url", "apikey", "project_id" can be directly provided
            instead.
        model_name (str, optional): ID of a model to be used for inference. Mutually
            exclusive with 'deployment_id'.
        deployment_id (str, optional): Deployment ID of a tuned model to be used for
            inference. Mutually exclusive with 'model_name'.
        parameters (WMLInferenceEngineParams, optional): Instance of WMLInferenceEngineParams
            which defines inference parameters and their values. Deprecated attribute, please
            pass respective parameters directly to the WMLInferenceEngine class instead.
       concurrency_limit (int): number of requests that will be sent in parallel, max is 10. 

Copy link
Collaborator

@pawelknes pawelknes left a comment

Choose a reason for hiding this comment

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

lgtm

Signed-off-by: elronbandel <elronbandel@gmail.com>
@elronbandel
Copy link
Member Author

Done @allyssonf.

@elronbandel elronbandel enabled auto-merge (squash) September 24, 2024 14:27
@elronbandel elronbandel merged commit 815532c into main Sep 24, 2024
8 checks passed
@elronbandel elronbandel deleted the add-concurency-limit branch September 24, 2024 14:49
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.

WMLInferenceEngine concurrency_limit
3 participants