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

Addressing issue #65 - Expanded evaluator class: extract results as a Dataframe #80

Merged
merged 11 commits into from
Sep 12, 2024

Conversation

adgianv
Copy link
Contributor

@adgianv adgianv commented Sep 2, 2024

This pull request addresses issue #65 (comment), 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:

  • Transposed the nested dictionary from the Evaluator class.
  • Exported the transposed dictionary to a pandas DataFrame.
  • Introduced Pandas as dependency

These changes improve the usability of the evaluation results by providing a straightforward way to view and analyse them in a tabular format.

@nsorros
Copy link
Collaborator

nsorros commented Sep 2, 2024

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.

@adgianv adgianv changed the title Expanded evaluator class: added method to return results of the nested dictionary as a pandas data frame Expanded evaluator class added method to return results of the nested dictionary as a pandas data frame Sep 2, 2024
@adgianv adgianv changed the title Expanded evaluator class added method to return results of the nested dictionary as a pandas data frame Expanded evaluator class: added method to return results of the nested dictionary as a pandas data frame Sep 2, 2024
@adgianv adgianv changed the title Expanded evaluator class: added method to return results of the nested dictionary as a pandas data frame Expanded evaluator class: Following issue #65 (https://github.com/MantisAI/nervaluate/issues/65#issue-1715456415) which required to extract the results of the nested dictionary of the evaluator class as a Dataframe, these changes solve the issue adding a method to the class to make the necessary changes to the results. Sep 2, 2024
@adgianv adgianv changed the title Expanded evaluator class: Following issue #65 (https://github.com/MantisAI/nervaluate/issues/65#issue-1715456415) which required to extract the results of the nested dictionary of the evaluator class as a Dataframe, these changes solve the issue adding a method to the class to make the necessary changes to the results. Expanded evaluator class: extract results as a Dataframe #65 Sep 2, 2024
@adgianv
Copy link
Contributor Author

adgianv commented Sep 2, 2024

This pull request addresses issue #65 (comment), 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.

@adgianv adgianv changed the title Expanded evaluator class: extract results as a Dataframe #65 Expanded evaluator class: extract results as a Dataframe issue #65 Sep 2, 2024
@ivyleavedtoadflax
Copy link
Collaborator

Much better - this can now go into the PR description

@adgianv adgianv changed the title Expanded evaluator class: extract results as a Dataframe issue #65 Expanded evaluator class: extract results as a Dataframe issue #65. Sep 5, 2024
@adgianv adgianv changed the title Expanded evaluator class: extract results as a Dataframe issue #65. Expanded evaluator class: extract results as a Dataframe issue #65. Sep 5, 2024
@adgianv adgianv changed the title Expanded evaluator class: extract results as a Dataframe issue #65. Expanded evaluator class: extract results as a Dataframe issue #65. This pull request addresses issue #65 (comment), 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. Sep 5, 2024
@adgianv adgianv changed the title Expanded evaluator class: extract results as a Dataframe issue #65. This pull request addresses issue #65 (comment), 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. Expanded evaluator class: extract results as a Dataframe issue #65. This pull request addresses issue #65 (comment), 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. Sep 5, 2024
@davidsbatista
Copy link
Collaborator

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?

@adgianv adgianv changed the title Expanded evaluator class: extract results as a Dataframe issue #65. This pull request addresses issue #65 (comment), 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. Expanded evaluator class: extract results as a Dataframe. Addreessing issue #65, which involved extracting the results from the Evaluator class as a pandas DataFrame. Sep 6, 2024
@adgianv
Copy link
Contributor Author

adgianv commented Sep 6, 2024

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.

@adgianv adgianv changed the title Expanded evaluator class: extract results as a Dataframe. Addreessing issue #65, which involved extracting the results from the Evaluator class as a pandas DataFrame. Expanded evaluator class: extract results as a Dataframe. Addreessing issue #65(comment), which involved extracting the results from the Evaluator class as a pandas DataFrame. Sep 6, 2024
@adgianv adgianv changed the title Expanded evaluator class: extract results as a Dataframe. Addreessing issue #65(comment), which involved extracting the results from the Evaluator class as a pandas DataFrame. Expanded evaluator class: extract results as a Dataframe. Addreessing issue #65, which involved extracting the results from the Evaluator class as a pandas DataFrame. Sep 6, 2024
@adgianv
Copy link
Contributor Author

adgianv commented Sep 9, 2024

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.

@nsorros
Copy link
Collaborator

nsorros commented Sep 10, 2024

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

@adgianv adgianv changed the title Expanded evaluator class: extract results as a Dataframe. Addreessing issue #65, which involved extracting the results from the Evaluator class as a pandas DataFrame. Addressing issue #65 - Expanded evaluator class: extract results as a Dataframe Sep 10, 2024
@davidsbatista
Copy link
Collaborator

this PR also introduces pandas as a dependency

@adgianv
Copy link
Contributor Author

adgianv commented Sep 10, 2024

this PR also introduces pandas as a dependency

I added it in the description

@davidsbatista
Copy link
Collaborator

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

requirements_dev.txt Outdated Show resolved Hide resolved
@davidsbatista
Copy link
Collaborator

seems all good now! 🚀 thanks for your effort and contribution! I will approved it

Copy link
Collaborator

@davidsbatista davidsbatista left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@davidsbatista
Copy link
Collaborator

@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?

@davidsbatista davidsbatista merged commit df0e695 into MantisAI:main Sep 12, 2024
1 check passed
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

Successfully merging this pull request may close these issues.

5 participants