Skip to content

Commit

Permalink
fix to t5 adapter and ia3 evals due to predict_step dictionary key ch…
Browse files Browse the repository at this point in the history
…anges (#5193)

Signed-off-by: arendu <adithya.r@gmail.com>

Signed-off-by: arendu <adithya.r@gmail.com>
  • Loading branch information
arendu committed Oct 18, 2022
1 parent 8242d72 commit acb5073
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
12 changes: 8 additions & 4 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,8 @@ pipeline {
pipeline_model_parallel_size=2 \
data.global_batch_size=2 \
data.micro_batch_size=2 \
data.test_ds=['/home/TestData/nlp/prompt_learning/rte_CI_test.jsonl']"
data.test_ds=['/home/TestData/nlp/prompt_learning/rte_CI_test.jsonl'] \
pred_file_path='examples/adapter_tuning/test_tp1_pp2/preds.txt'"
sh "rm -rf examples/adapter_tuning/test_tp1_pp2.nemo"
sh "rm -rf examples/adapter_tuning/test_tp1_pp2"
}
Expand Down Expand Up @@ -742,7 +743,8 @@ pipeline {
tensor_model_parallel_size=2 \
data.global_batch_size=2 \
data.micro_batch_size=2 \
data.test_ds=['/home/TestData/nlp/prompt_learning/rte_CI_test.jsonl']"
data.test_ds=['/home/TestData/nlp/prompt_learning/rte_CI_test.jsonl'] \
pred_file_path='examples/adapter_tuning/test_tp2_pp1/preds.txt'"
sh "rm -rf examples/adapter_tuning/test_tp2_pp1.nemo"
sh "rm -rf examples/adapter_tuning/test_tp2_pp1"
}
Expand Down Expand Up @@ -785,7 +787,8 @@ pipeline {
pipeline_model_parallel_size=2 \
data.global_batch_size=2 \
data.micro_batch_size=2 \
data.test_ds=['/home/TestData/nlp/prompt_learning/rte_CI_test.jsonl']"
data.test_ds=['/home/TestData/nlp/prompt_learning/rte_CI_test.jsonl'] \
pred_file_path='examples/ia3_tuning/test_tp1_pp2/preds.txt'"
sh "rm -rf examples/ia3_tuning/test_tp1_pp2.nemo"
sh "rm -rf examples/ia3_tuning/test_tp1_pp2"
}
Expand Down Expand Up @@ -826,7 +829,8 @@ pipeline {
tensor_model_parallel_size=2 \
data.global_batch_size=2 \
data.micro_batch_size=2 \
data.test_ds=['/home/TestData/nlp/prompt_learning/rte_CI_test.jsonl']"
data.test_ds=['/home/TestData/nlp/prompt_learning/rte_CI_test.jsonl'] \
pred_file_path='examples/ia3_tuning/test_tp2_pp1/preds.txt'"
sh "rm -rf examples/ia3_tuning/test_tp2_pp1.nemo"
sh "rm -rf examples/ia3_tuning/test_tp2_pp1"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def dummy():
if cfg.pred_file_path is not None:
with open(cfg.pred_file_path, "w", encoding="utf-8") as f:
for batch in response:
for inp, pred in zip(batch['enc_input'], batch['predicted_token_ids']):
for inp, pred in zip(batch['input_text'], batch['preds_text']):
inp = ' '.join(inp.split('\n'))
pred = ' '.join(pred.split('\n'))
f.write(f'{inp} {pred}\n')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def dummy():
if cfg.pred_file_path is not None:
with open(cfg.pred_file_path, "w", encoding="utf-8") as f:
for batch in response:
for inp, pred in zip(batch['enc_input'], batch['predicted_token_ids']):
for inp, pred in zip(batch['input_text'], batch['preds_text']):
inp = ' '.join(inp.split('\n'))
pred = ' '.join(pred.split('\n'))
f.write(f'{inp} {pred}\n')
Expand Down

0 comments on commit acb5073

Please sign in to comment.