|
|
@ -857,8 +857,12 @@ def _prepare_eval_run(
|
|
|
|
project_name: str,
|
|
|
|
project_name: str,
|
|
|
|
) -> Tuple[MCF, str, Dataset, List[Example]]:
|
|
|
|
) -> Tuple[MCF, str, Dataset, List[Example]]:
|
|
|
|
wrapped_model = _wrap_in_chain_factory(llm_or_chain_factory, dataset_name)
|
|
|
|
wrapped_model = _wrap_in_chain_factory(llm_or_chain_factory, dataset_name)
|
|
|
|
|
|
|
|
dataset = client.read_dataset(dataset_name=dataset_name)
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
project = client.create_project(project_name)
|
|
|
|
project = client.create_project(
|
|
|
|
|
|
|
|
project_name,
|
|
|
|
|
|
|
|
reference_dataset_id=dataset.id,
|
|
|
|
|
|
|
|
)
|
|
|
|
except ValueError as e:
|
|
|
|
except ValueError as e:
|
|
|
|
if "already exists " not in str(e):
|
|
|
|
if "already exists " not in str(e):
|
|
|
|
raise e
|
|
|
|
raise e
|
|
|
@ -869,7 +873,6 @@ def _prepare_eval_run(
|
|
|
|
f"View the evaluation results for project '{project_name}' at:\n{project.url}",
|
|
|
|
f"View the evaluation results for project '{project_name}' at:\n{project.url}",
|
|
|
|
flush=True,
|
|
|
|
flush=True,
|
|
|
|
)
|
|
|
|
)
|
|
|
|
dataset = client.read_dataset(dataset_name=dataset_name)
|
|
|
|
|
|
|
|
examples = list(client.list_examples(dataset_id=dataset.id))
|
|
|
|
examples = list(client.list_examples(dataset_id=dataset.id))
|
|
|
|
if not examples:
|
|
|
|
if not examples:
|
|
|
|
raise ValueError(f"Dataset {dataset_name} has no example rows.")
|
|
|
|
raise ValueError(f"Dataset {dataset_name} has no example rows.")
|
|
|
|