Evaluates an agent given the eval sets. AGENT_MODULE_FILE_PATH: The path to the __init__.py file that contains a module by the name "agent". "agent" module contains a root_agent. EVAL_SET_FILE_PATH_OR_ID: You can specify one or more eval set file paths or eval set id. Mixing of eval set
(
agent_module_file_path: str,
eval_set_file_path_or_id: list[str],
config_file_path: str,
print_detailed_results: bool,
eval_storage_uri: str | None = None,
log_level: str = "INFO",
)
| 935 | ) |
| 936 | @eval_options() |
| 937 | def cli_eval( |
| 938 | agent_module_file_path: str, |
| 939 | eval_set_file_path_or_id: list[str], |
| 940 | config_file_path: str, |
| 941 | print_detailed_results: bool, |
| 942 | eval_storage_uri: str | None = None, |
| 943 | log_level: str = "INFO", |
| 944 | ): |
| 945 | """Evaluates an agent given the eval sets. |
| 946 | |
| 947 | AGENT_MODULE_FILE_PATH: The path to the __init__.py file that contains a |
| 948 | module by the name "agent". "agent" module contains a root_agent. |
| 949 | |
| 950 | EVAL_SET_FILE_PATH_OR_ID: You can specify one or more eval set file paths or |
| 951 | eval set id. |
| 952 | |
| 953 | Mixing of eval set file paths with eval set ids is not allowed. |
| 954 | |
| 955 | *Eval Set File Path* |
| 956 | For each file, all evals will be run by default. |
| 957 | |
| 958 | If you want to run only specific evals from an eval set, first create a comma |
| 959 | separated list of eval names and then add that as a suffix to the eval set |
| 960 | file name, demarcated by a `:`. |
| 961 | |
| 962 | For example, we have `sample_eval_set_file.json` file that has following the |
| 963 | eval cases: |
| 964 | sample_eval_set_file.json: |
| 965 | |....... eval_1 |
| 966 | |....... eval_2 |
| 967 | |....... eval_3 |
| 968 | |....... eval_4 |
| 969 | |....... eval_5 |
| 970 | |
| 971 | sample_eval_set_file.json:eval_1,eval_2,eval_3 |
| 972 | |
| 973 | This will only run eval_1, eval_2 and eval_3 from sample_eval_set_file.json. |
| 974 | |
| 975 | *Eval Set ID* |
| 976 | For each eval set, all evals will be run by default. |
| 977 | |
| 978 | If you want to run only specific evals from an eval set, first create a comma |
| 979 | separated list of eval names and then add that as a suffix to the eval set |
| 980 | file name, demarcated by a `:`. |
| 981 | |
| 982 | For example, we have `sample_eval_set_id` that has following the eval cases: |
| 983 | sample_eval_set_id: |
| 984 | |....... eval_1 |
| 985 | |....... eval_2 |
| 986 | |....... eval_3 |
| 987 | |....... eval_4 |
| 988 | |....... eval_5 |
| 989 | |
| 990 | If we did: |
| 991 | sample_eval_set_id:eval_1,eval_2,eval_3 |
| 992 | |
| 993 | This will only run eval_1, eval_2 and eval_3 from sample_eval_set_id. |
| 994 |
nothing calls this directly
no test coverage detected