diff --git a/sdk/ai/azure-ai-generative/azure/ai/generative/evaluate/_local_flow_handler.py b/sdk/ai/azure-ai-generative/azure/ai/generative/evaluate/_local_flow_handler.py index 096678144590..4853bb18692e 100644 --- a/sdk/ai/azure-ai-generative/azure/ai/generative/evaluate/_local_flow_handler.py +++ b/sdk/ai/azure-ai-generative/azure/ai/generative/evaluate/_local_flow_handler.py @@ -1,6 +1,8 @@ # --------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # --------------------------------------------------------- +# pylint: disable=E0611 + import logging import pandas as pd diff --git a/sdk/ai/azure-ai-generative/azure/ai/generative/evaluate/_metric_handler.py b/sdk/ai/azure-ai-generative/azure/ai/generative/evaluate/_metric_handler.py index 2f1cb62fb72f..82e966727214 100644 --- a/sdk/ai/azure-ai-generative/azure/ai/generative/evaluate/_metric_handler.py +++ b/sdk/ai/azure-ai-generative/azure/ai/generative/evaluate/_metric_handler.py @@ -66,7 +66,7 @@ def calculate_metrics(self) -> Dict: dict_list = self._get_data_for_pf_by_task_type(metrics) flow_path = path.join(path.dirname(__file__), "pf_templates", "built_in_metrics", self.task_type) - + # pylint: disable=E0611 from promptflow import PFClient from promptflow.entities import AzureOpenAIConnection, OpenAIConnection diff --git a/sdk/ai/azure-ai-generative/azure/ai/generative/evaluate/_utils.py b/sdk/ai/azure-ai-generative/azure/ai/generative/evaluate/_utils.py index 8f7435e655d4..276c2e90b826 100644 --- a/sdk/ai/azure-ai-generative/azure/ai/generative/evaluate/_utils.py +++ b/sdk/ai/azure-ai-generative/azure/ai/generative/evaluate/_utils.py @@ -1,6 +1,7 @@ # --------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # --------------------------------------------------------- +# pylint: skip-file import os.path import json import pathlib diff --git a/sdk/ai/azure-ai-generative/azure/ai/generative/synthetic/simulator/simulator/simulator.py b/sdk/ai/azure-ai-generative/azure/ai/generative/synthetic/simulator/simulator/simulator.py index 1e8e94953f24..8e4bd5d0d36e 100644 --- a/sdk/ai/azure-ai-generative/azure/ai/generative/synthetic/simulator/simulator/simulator.py +++ b/sdk/ai/azure-ai-generative/azure/ai/generative/synthetic/simulator/simulator/simulator.py @@ -491,6 +491,7 @@ def _wrap_async( api_call_retry_sleep_sec: int = 1, api_call_delay_sec: float = 0, concurrent_async_task: int = 1, + max_simulation_results: int = 3, ): if parameters is None: parameters = [] @@ -503,6 +504,7 @@ def _wrap_async( api_call_retry_limit=api_call_retry_limit, api_call_retry_sleep_sec=api_call_retry_sleep_sec, api_call_delay_sec=api_call_delay_sec, + max_simulation_results=max_simulation_results, concurrent_async_task=concurrent_async_task, ) ) @@ -517,6 +519,7 @@ def simulate( api_call_retry_limit: int = 3, api_call_retry_sleep_sec: int = 1, api_call_delay_sec: float = 0, + max_simulation_results: int = 3, ): """ Simulates a conversation using a predefined template with customizable parameters and control over API behavior. @@ -536,6 +539,8 @@ def simulate( :param api_call_delay_sec: The number of seconds to wait before making a new API call to simulate conversation delay. :type api_call_delay_sec: float, optional + :keyword max_simulation_results: The maximum number of simulation results to return. Defaults to 3. + :paramtype max_simulation_results: int, optional :return: The outcome of the simulated conversations as a list. :rtype: List[Dict] """ @@ -555,6 +560,7 @@ def simulate( api_call_retry_limit, api_call_retry_sleep_sec, api_call_delay_sec, + max_simulation_results, concurrent_async_task, ), )