• Funtowicz Morgan's avatar
    Ability to pickle/unpickle BatchEncoding pickle (reimport) (#5039) · 9e033649
    Funtowicz Morgan authored
    * Added is_fast property on BatchEncoding to indicate if the object comes from a Fast Tokenizer.
    
    * Added __get_state__() & __set_state__() to be pickable.
    
    * Correct tokens() return type from List[int] to List[str]
    
    * Added unittest for BatchEncoding pickle/unpickle
    
    * Added unittest for BatchEncoding is_fast
    
    * More careful checking on BatchEncoding unpickle tests.
    
    * Formatting.
    
    * is_fast should assertTrue on Rust tokenizers.
    
    * Ensure tensorflow has correct way of checking array_equal
    
    * More formatting.
    9e033649
test_tokenization_utils.py 5.69 KB