Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

fix datatype option for wizard_of_internet task #4962

Merged
merged 1 commit into from Apr 11, 2023

Conversation

heya5
Copy link
Contributor

@heya5 heya5 commented Feb 19, 2023

Patch description
Fix a bug of wizard_of_internet task. This bug led to a wrong number of examples when use "train:evalmode" as datatype.
The problem is like this:
image

Testing steps
To test this PR, you can run parlai convert_to_json -t wizard_of_internet --datatype train:evalmode
Expect to get the correct number of samples.
image

@heya5 heya5 changed the title fix datatype fix datatype option for wizard_of_internet task Feb 19, 2023
@mojtaba-komeili
Copy link
Contributor

Thanks for reporting the bug. I don't see how this fixes it though. Unless I missed something, get_dtype function and the DatatypeHelper are doing the same thing?

@heya5
Copy link
Contributor Author

heya5 commented Feb 21, 2023

Hi, you can check the get_dtype() function, it will return "train" when we use "train:evalmode" as datatype. Because the get_dtype() function will call DatatypeHelper.fold method in which the datatype is splited by ":".
When we set "train:evalmode" or "train:ordered" as datatype, the WizardOfInternetBaseTeacher still get train as datatype.

@heya5
Copy link
Contributor Author

heya5 commented Mar 4, 2023

Hi, I see a Linting problem, but it doesn't seem to be related to this PR.

@mojtaba-komeili
Copy link
Contributor

Don't worry we had some issues relate to the tests recently.

@github-actions
Copy link

github-actions bot commented Apr 6, 2023

This PR has not had activity in 30 days. Closing due to staleness.

@github-actions github-actions bot added the stale label Apr 6, 2023
@klshuster klshuster merged commit c354b89 into facebookresearch:main Apr 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants