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

Optionally ignore utf-8 decoding error when converting std::string to python str. #97282

Closed
wants to merge 1 commit into from

Commits on Mar 22, 2023

  1. Optionally ignore utf-8 decoding error when converting std::string to…

    … python str. (pytorch#97282)
    
    Summary:
    Pull Request resolved: pytorch#97282
    
    X-link: pytorch/text#2126
    
    When language models use c++ tokenizer, outputs are a c++ strings that are not necessarily valid utf-8 encodings. Default pybind11 casting uses strict utf-8 decoding. We relax the decoding using 'ignore' argument.
    
    Test Plan: https://www.internalfb.com/intern/testinfra/testrun/4503599786612705
    
    Reviewed By: Nayef211
    
    Differential Revision: D43970697
    
    fbshipit-source-id: d54a7c527d702bec37544442f9ce6e2d441ddc47
    shuminghu authored and facebook-github-bot committed Mar 22, 2023
    Configuration menu
    Copy the full SHA
    237daaa View commit details
    Browse the repository at this point in the history