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

fixes for validation engine and for using torchrun #22

Merged
merged 1 commit into from
Jun 22, 2022

Conversation

jgmf-amazon
Copy link
Contributor

Issue #21

Description of changes:
There are two fixes given:

  1. Code was added to the eval_preds function in training_utils.py per the suggestion of @bozheng-hit .With the current main branch, the validation engine is not functioning correctly, because subwords after the first subword are being handled by the convert_to_bio function. Instead, we want to merge/ignore the subsequent subwords and use only the prediction from the first subword. This change sets subsequent subwords to -100.
  2. The train, test, and HPO scripts were modified to accept environmental variables for local_rank, allowing them to support torchrun.

I tested the changes with the xlmr_base example configs, both with train.py and test.py.

Once these changes are approved, I'll update the README. Thanks.

@jgmf-amazon jgmf-amazon merged commit 3932705 into main Jun 22, 2022
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.

2 participants