Evaluator Built in image bump to v5 (#3533)
Co-authored-by: Shruti Iyer <iyershruti@microsoft.com>
This commit is contained in:
Родитель
efe48cb7c1
Коммит
4db12d6022
|
@ -45,7 +45,8 @@ def copy_evaluator_files(command_line_args):
|
|||
if dir_path:
|
||||
shutil.copytree(dir_path, f"./{evaluator_name}")
|
||||
logger.info(f"Copying {dir_path} to ./{evaluator_name}")
|
||||
logger.info(evaluator_name, os.listdir(f"./{evaluator_name}"))
|
||||
copied_dir = os.listdir(f"./{evaluator_name}")
|
||||
logger.info(f"Directory ./{evaluator_name} now contains: {copied_dir}")
|
||||
sys.path.append(os.path.abspath(f"./{evaluator_name}"))
|
||||
else:
|
||||
logger.info(f"Directory for evaluator {evaluator_name} not found.")
|
||||
|
@ -79,8 +80,8 @@ def get_evaluator_config(command_line_args):
|
|||
|
||||
def run_evaluation(command_line_args, evaluators, evaluator_config):
|
||||
"""Run evaluation using evaluators."""
|
||||
logger.info("evaluators", evaluators)
|
||||
logger.info("evaluator_config", evaluator_config)
|
||||
logger.info(f"Running the evaluators: {list(evaluators.keys())}")
|
||||
logger.info(f"With the evaluator config {evaluator_config}")
|
||||
results = evaluate(
|
||||
data=command_line_args.eval_data,
|
||||
evaluators=evaluators,
|
||||
|
@ -88,7 +89,7 @@ def run_evaluation(command_line_args, evaluators, evaluator_config):
|
|||
)
|
||||
metrics = {}
|
||||
for metric_name, metric_value in results["metrics"].items():
|
||||
logger.info("Logging metric:", metric_name, metric_value)
|
||||
logger.info(f"Logging metric added with name {metric_name}, and value {metric_value}")
|
||||
metrics[metric_name] = metric_value
|
||||
mlflow.log_metrics(metrics)
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
azure-ai-evaluation~=1.0.0b4
|
||||
azure-ai-evaluation~=1.0.0b5
|
||||
azureml-mlflow=={{latest-pypi-version}}
|
||||
azure-ai-ml=={{latest-pypi-version}}
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ def load_evaluator(evaluator):
|
|||
"""Load evaluator as flow."""
|
||||
logger.info(f"Loading evaluator {evaluator}")
|
||||
loaded_evaluator = load_flow(evaluator)
|
||||
logger.info(loaded_evaluator)
|
||||
logger.info(f"Loaded evaluator {loaded_evaluator}")
|
||||
module_parent = loaded_evaluator.path.parent.name
|
||||
module_name = loaded_evaluator.entry.split(":")[0]
|
||||
module_path = os.path.join(os.getcwd(), module_parent, module_name + ".py")
|
||||
|
|
Загрузка…
Ссылка в новой задаче