Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion aixplain/enums/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
File renamed without changes.
4 changes: 2 additions & 2 deletions aixplain/factories/benchmark_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion aixplain/modules/agent/tool/custom_python_code_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
12 changes: 6 additions & 6 deletions aixplain/modules/benchmark_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {}
Expand All @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion aixplain/modules/metric.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down