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

[BB2] Handling increase in batch size from dynamic batching #4238

Merged
merged 1 commit into from
Dec 16, 2021

Conversation

mojtaba-komeili
Copy link
Contributor

Patch description
Dynamic batching in ParlAI increases the batch size. This causes some issues with empty doc_score place-holders that BB2 uses: they don't get filled and remain empty, which results in run-time error during tensor operations. This patch filters the empty doc_score place-holders.

@klshuster
Copy link
Contributor

klshuster commented Dec 9, 2021

could you elaborate why there are "empty" doc scores?

edit: nvm, think I understand. does this not mess up the scores computations down the road?

@mojtaba-komeili
Copy link
Contributor Author

could you elaborate why there are "empty" doc scores?

edit: nvm, think I understand. does this not mess up the scores computations down the road?

Do we even use the empty ones even. I thought they were ignored. I don't really know much about how dynamic batching works.

@stephenroller
Copy link
Contributor

https://parl.ai/docs/tutorial_worlds.html see here for an explanation of dynamic batching

@mojtaba-komeili
Copy link
Contributor Author

https://parl.ai/docs/tutorial_worlds.html see here for an explanation of dynamic batching

Actually reading that helped me find the bug, but I am not sure if ignoring the empty batches is safe for BB2.

@mojtaba-komeili mojtaba-komeili merged commit cd58114 into main Dec 16, 2021
@mojtaba-komeili mojtaba-komeili deleted the bb2-dynb branch December 16, 2021 16:29
mojtaba-komeili added a commit that referenced this pull request Dec 16, 2021
* ConversationTeacher parent class changed

* reformat

* [Crowdsourcing] can call blueprints from command line  (#4254)

* remove unnecessary run scripts

* udpate readmes

* BB2 handling increase in batch size during dynamic batching (#4238)

* ConversationTeacher parent class changed

* reformat

* changed the teacher, tests are passing

* removing 'episode_done' if it exists in the example

Co-authored-by: Megan Ung <20617868+meganung@users.noreply.github.com>
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.

4 participants