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

There is a bug in the get_examples_from_df module #1505

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

knc6
Copy link

@knc6 knc6 commented Mar 16, 2023

The get_examples_from_df requires a pandas dataframe and not a list.

@luketudge
Copy link
Contributor

I am not totally sure, but I think this is not a bug.

The body of the get_examples_from_df function expects a pandas dataframe, yes, and it won't work if you pass a list instead, but is there a good reason why the function should accept and convert lists? The general convention in Python is not to do type checking and conversion unless there is a particular reason. If conversion of other types to dataframes were to be implemented consistently throughout the simpletransformers code then there are a lot more places it would need to be inserted than just here.

If anything does need to change here it is that the function should have a docstring and/or type hints that clarify the expected input types.

But please do clarify if there is a case where your proposed change is important! I may have misunderstood.

@stale
Copy link

stale bot commented Jun 18, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale This issue has become stale label Jun 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale This issue has become stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants