Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DeepEval, G-Eval logging issues. #1244

Open
j0ntendo opened this issue Jan 1, 2025 · 0 comments
Open

DeepEval, G-Eval logging issues. #1244

j0ntendo opened this issue Jan 1, 2025 · 0 comments

Comments

@j0ntendo
Copy link

j0ntendo commented Jan 1, 2025

Hello,
I am testing different LLM's and evaluating them with G-eval.
I want to log the (GEval) Verbose Logs into a .json file but it keeps appearing as None.
It keeps outputting in the terminal, but I want to log them automatically as I am testing with multiple datasets.
Below is an example of me trying to log the terminal outputs but still failed.

` log_output = io.StringIO()
with redirect_stdout(log_output):
test_case = LLMTestCase(
input=prompt,
actual_output=model_answer,
expected_output=reference_answer
)
explainability_result = explainability_metric.measure(test_case)

    # Extract the captured logs
    verbose_log = log_output.getvalue()

    if explainability_result is None or explainability_result.score is None:
        explainability_score = 0
        explanation = "Explainability evaluation failed - no valid output returned."
    else:
        explainability_score = explainability_result.score
        explanation = explainability_result.reason

`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant