-
Notifications
You must be signed in to change notification settings - Fork 496
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e451834
commit 88c65e6
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Copyright (c) Meta Platforms, Inc. and affiliates. | ||
# All rights reserved. | ||
# | ||
# This source code is licensed under the BSD-style license found in the | ||
# LICENSE file in the root directory of this source tree. | ||
|
||
# NOTE: This file is maintained for backward compatibility purposes. | ||
# The imports below point to the new location in `torchtune.modules.transforms.tokenizers`. | ||
# The import paths will be removed in v0.7. Please update your code to use the new path | ||
# (torchtune.modules.transforms.tokenizers) to avoid breaking changes in future releases. | ||
|
||
|
||
import warnings | ||
|
||
from torchtune.modules.transforms.tokenizers import ( | ||
BaseTokenizer, | ||
ModelTokenizer, | ||
parse_hf_tokenizer_json, | ||
SentencePieceBaseTokenizer, | ||
TikTokenBaseTokenizer, | ||
tokenize_messages_no_special_tokens, | ||
) | ||
|
||
warnings.warn( | ||
"The import path 'torchtune.modules.tokenizers' is deprecated and will be removed in v0.7. " | ||
"Please update your imports to 'torchtune.modules.transforms.tokenizers'.", | ||
DeprecationWarning, | ||
stacklevel=2, | ||
) | ||
|
||
|
||
__all__ = [ | ||
"SentencePieceBaseTokenizer", | ||
"TikTokenBaseTokenizer", | ||
"ModelTokenizer", | ||
"BaseTokenizer", | ||
"tokenize_messages_no_special_tokens", | ||
"parse_hf_tokenizer_json", | ||
] |