From a6d292241b76bb6a14e3a8f74b4b98b61ace4410 Mon Sep 17 00:00:00 2001 From: ankit0305 Date: Sun, 3 Aug 2025 14:18:43 +0100 Subject: [PATCH] fixing typos --- aixplain/enums/__init__.py | 2 +- .../{code_interpeter.py => code_interpreter.py} | 0 aixplain/factories/benchmark_factory.py | 4 ++-- .../modules/agent/tool/custom_python_code_tool.py | 2 +- aixplain/modules/benchmark_job.py | 12 ++++++------ aixplain/modules/metric.py | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) rename aixplain/enums/{code_interpeter.py => code_interpreter.py} (100%) diff --git a/aixplain/enums/__init__.py b/aixplain/enums/__init__.py index 6162ed86..17308467 100644 --- a/aixplain/enums/__init__.py +++ b/aixplain/enums/__init__.py @@ -20,4 +20,4 @@ from .asset_status import AssetStatus from .index_stores import IndexStores from .function_type import FunctionType -from .code_interpeter import CodeInterpreterModel +from .code_interpreter import CodeInterpreterModel diff --git a/aixplain/enums/code_interpeter.py b/aixplain/enums/code_interpreter.py similarity index 100% rename from aixplain/enums/code_interpeter.py rename to aixplain/enums/code_interpreter.py diff --git a/aixplain/factories/benchmark_factory.py b/aixplain/factories/benchmark_factory.py index 1c4408ea..1ca29c1a 100644 --- a/aixplain/factories/benchmark_factory.py +++ b/aixplain/factories/benchmark_factory.py @@ -187,7 +187,7 @@ def _reformat_model_list(cls, model_list: List[Model]) -> Tuple[List[Any], List[ model_list_without_parms.append(model.id) if len(model_list_with_parms) > 0: if len(model_list_without_parms) > 0: - raise Exception("Please provide addditional info for all models or for none of the models") + raise Exception("Please provide additional info for all models or for none of the models") else: model_list_with_parms = None return model_list_without_parms, model_list_with_parms @@ -196,7 +196,7 @@ def _reformat_model_list(cls, model_list: List[Model]) -> Tuple[List[Any], List[ @classmethod def create(cls, name: str, dataset_list: List[Dataset], model_list: List[Model], metric_list: List[Metric]) -> Benchmark: """Creates a benchmark based on the information provided like name, dataset list, model list and score list. - Note: This only creates a benchmark. It needs to run seperately using start_benchmark_job. + Note: This only creates a benchmark. It needs to run separately using start_benchmark_job. Args: name (str): Unique Name of benchmark diff --git a/aixplain/modules/agent/tool/custom_python_code_tool.py b/aixplain/modules/agent/tool/custom_python_code_tool.py index 05715b2a..1fc4e40c 100644 --- a/aixplain/modules/agent/tool/custom_python_code_tool.py +++ b/aixplain/modules/agent/tool/custom_python_code_tool.py @@ -25,7 +25,7 @@ from aixplain.modules.agent.tool import Tool import logging from aixplain.enums import AssetStatus -from aixplain.enums.code_interpeter import CodeInterpreterModel +from aixplain.enums.code_interpreter import CodeInterpreterModel class CustomPythonCodeTool(Tool): diff --git a/aixplain/modules/benchmark_job.py b/aixplain/modules/benchmark_job.py index 4ab0865b..ac4233b9 100644 --- a/aixplain/modules/benchmark_job.py +++ b/aixplain/modules/benchmark_job.py @@ -134,7 +134,7 @@ def get_scores(self, return_simplified=True, return_as_dataframe=True): logging.error(error_message, exc_info=True) raise Exception(error_message) - def get_failuire_rate(self, return_as_dataframe=True): + def get_failure_rate(self, return_as_dataframe=True): try: scores = self.get_scores(return_simplified=False) failure_rates = {} @@ -143,19 +143,19 @@ def get_failuire_rate(self, return_as_dataframe=True): failure_rates[model_id] = 0 continue score_info = model_info["rawScores"][0] - num_succesful = score_info["count"] + num_successful = score_info["count"] num_failed = score_info["failedSegmentsCount"] - failuire_rate = (num_failed * 100) / (num_succesful + num_failed) - failure_rates[model_id] = failuire_rate + failure_rate = (num_failed * 100) / (num_successful + num_failed) + failure_rates[model_id] = failure_rate if return_as_dataframe: df = pd.DataFrame() df["Model"] = list(failure_rates.keys()) - df["Failuire Rate"] = list(failure_rates.values()) + df["Failure Rate"] = list(failure_rates.values()) return df else: return failure_rates except Exception as e: - error_message = f"Benchmark scores: Error in Getting benchmark failuire rate: {e}" + error_message = f"Benchmark scores: Error in Getting benchmark failure rate: {e}" logging.error(error_message, exc_info=True) raise Exception(error_message) diff --git a/aixplain/modules/metric.py b/aixplain/modules/metric.py index 86c08a08..4d7d1abe 100644 --- a/aixplain/modules/metric.py +++ b/aixplain/modules/metric.py @@ -26,7 +26,7 @@ class Metric(Asset): - """Represents a metric to be computed on one or more peices of data. It is usually linked to a machine learning task. + """Represents a metric to be computed on one or more pieces of data. It is usually linked to a machine learning task. Attributes: id (Text): ID of the Metric