-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Bug fix: Multi-task with datatype train:stream #2788
Conversation
Your PR contains a change to a task. Please paste the results of the following command into a comment: python tests/datatests/test_new_tasks.py |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is_training
is much better
Why aren't tests running tho |
@klshuster 's idea |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesome, thank you!!
parlai/utils/data.py
Outdated
""" | ||
|
||
|
||
def is_training(datatype: str) -> bool: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😍
tbh I'm surprised that chunky teacher doesn't hang. |
also since tests aren't running here, maybe you can run tests locally? just to check |
Filed a bug with CircleCI. None of Emily's PRs will run tests until they fix something. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
god bless tests.
parlai/utils/data.py
Outdated
parlai datatype | ||
|
||
:return should_shuffle: | ||
given datatype, return whether we should cycle |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: shuffle
Patch description
@klshuster found a bug where if we multi-task with
-dt train:stream
, the shorter teacher will only complete 1 epoch. This is fixed by: (1) changing the condition we check for FixedDialogTeacher settingepoch_done
and (2) changingself.random
for multiworld. In the multiworld setting, we want to randomly choose between subworlds when training, even if the examples in the subworld may be ordered (as intrain:stream
).I wrote a test that fails before these changes and now passes.