Closed Craigacp closed 8 months ago
/azp run onnxruntime-extensions.CI
/azp run onnxruntime-extensions.CI
I ran the Python tests locally on macOS ARM64 and everything passed. The access violation in the Windows tests happens either in test_cliptok
or test_cv2
both of which passed fine on my machine and don't use the code I changed, and they also passed fine in Linux and macOS in the CI. Is there anything more I can do to run the failure down?
@sayanshaw24 , can you review this PR?
This fixes #639 by moving the fairseq id patching out of the loop so it's not applied multiple times to sequences earlier in the batch.
I've added the check to ensure it's not applied when
add_rev
is true mirroring its position in the for loop, but I'm unsure if that's required (presumably there are no HF tokenizers which emit a reversed string and have this fairseq hack?).I tested it against the example in #639 and both batches and single sequences work correctly now.