This PR fixes the error that occurs during translation inference in the test.py script of the deltalm module. The error is caused by the missing task attribute in the model configuration. Additionally, the test.py script is updated to include the necessary configurations for the translation task from English to Arabic.
Summary of Changes
In the DeltaLMModel class, the from_pretrained method is modified to set the task attribute in the configuration before loading the model.
In the test.py script, the paths to the pretrained model and SentencePiece model are updated for English to Arabic translation. The source sentence is also modified to an English sentence to be translated to Arabic.
Please review and merge this PR to fix the translation inference error and enable translation from English to Arabic.
Fixes #1.
To checkout this PR branch, run the following command in your terminal:
git checkout sweep/fix-translation-inference
To get Sweep to edit this pull request, leave a comment below or in the code. Leaving a comment in the code will only modify the file but commenting below can change the entire PR.
Description
This PR fixes the error that occurs during translation inference in the
test.py
script of thedeltalm
module. The error is caused by the missingtask
attribute in the model configuration. Additionally, thetest.py
script is updated to include the necessary configurations for the translation task from English to Arabic.Summary of Changes
DeltaLMModel
class, thefrom_pretrained
method is modified to set thetask
attribute in the configuration before loading the model.test.py
script, the paths to the pretrained model and SentencePiece model are updated for English to Arabic translation. The source sentence is also modified to an English sentence to be translated to Arabic.Please review and merge this PR to fix the translation inference error and enable translation from English to Arabic.
Fixes #1.
To checkout this PR branch, run the following command in your terminal:
To get Sweep to edit this pull request, leave a comment below or in the code. Leaving a comment in the code will only modify the file but commenting below can change the entire PR.