Closed adgianv closed 3 weeks ago
Write a more detailed description, refer to what issue this solves and include instructions on how the reviewer can test that its working. those instructions can form the basis of a test that is lacking as well.
This pull request addresses issue https://github.com/MantisAI/nervaluate/issues/65#issue-1715456415, which involved extracting the results from the Evaluator class as a pandas DataFrame.
Changes made:
Added Method: Introduced a new method results_to_dataframe in the Evaluator class. Functionality: This method transposes the nested dictionary of evaluation results and converts it into a pandas DataFrame. This transformation makes the results more readable and easier to analyze. Summary of Changes:
Transposed the nested dictionary from the Evaluator class. Exported the transposed dictionary to a pandas DataFrame. These changes improve the usability of the evaluation results by providing a straightforward way to view and analyse them in a tabular format.
Much better - this can now go into the PR description
Hi @adgianv , thanks for your contribution.
Please, rename the PR title to a sentence summarizing what you are proposing. Can you also add a test for the new method you are introducing?
Changes made:
Added Method: Introduced a new method results_to_dataframe in the Evaluator class. Functionality: This method transposes the nested dictionary of evaluation results and converts it into a pandas DataFrame. This transformation makes the results more readable and easier to analyze.
Summary of Changes:
Transposed the nested dictionary from the Evaluator class.
Exported the transposed dictionary to a pandas DataFrame.
These changes improve the usability of the evaluation results by providing a straightforward way to view and analyse them in a tabular format.
With this new commit I modified the results_to_dataframe method to allow for more complicated nested structures in the results. To do it I added a helper method in the Evaluator class called _flatten_dict, that flattens a nested dataframe.
I added a relevant test in the test_evaluator.py file called test_results_to_dataframe.
You just need to address the following two comments
Much better - this can now go into the PR description
and
Please, rename the PR title to a sentence summarizing what you are proposing. Can you also add a test for the new method you are introducing?
also tests need to pass in CI
this PR also introduces pandas as a dependency
this PR also introduces pandas as a dependency
I added it in the description
sorry, I meant you need to add it to the pyproject.toml
, you need to create a new section for dependencies and add it, for the other two CI errors one I fixed already the other is just the order of the imports
seems all good now! 🚀 thanks for your effort and contribution! I will approved it
@nsorros @ivyleavedtoadflax after this merge I would bump the version, add the release notes (how is that actually added?) - and then we can make a new release - wdyt?
This pull request addresses issue https://github.com/MantisAI/nervaluate/issues/65#issue-1715456415, which involved extracting the results from the Evaluator class as a pandas DataFrame.
Changes made:
Added Method: Introduced a new method results_to_dataframe in the Evaluator class. Functionality: This method transposes the nested dictionary of evaluation results and converts it into a pandas DataFrame. This transformation makes the results more readable and easier to analyse.
Summary of Changes:
These changes improve the usability of the evaluation results by providing a straightforward way to view and analyse them in a tabular format.