Skip to content

Commit

Permalink
Rename third_party folder to Avoid Copybara g3 Errors (#148)
Browse files Browse the repository at this point in the history
* rename third_party

* fix ut

* fix ut
  • Loading branch information
jyj0w0 authored Nov 8, 2024
1 parent 52d63a5 commit 15e3963
Show file tree
Hide file tree
Showing 10 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ unit-tests:
coverage run -m unittest -v

check-test-coverage:
coverage report -m --omit="jetstream/core/proto/*,jetstream/engine/tokenizer_pb2.py,jetstream/third_party/*" --fail-under=96
coverage report -m --omit="jetstream/core/proto/*,jetstream/engine/tokenizer_pb2.py,jetstream/external_tokenizers/*" --fail-under=96
2 changes: 1 addition & 1 deletion benchmarks/benchmark_serving.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
from jetstream.core.proto import jetstream_pb2
from jetstream.core.proto import jetstream_pb2_grpc
from jetstream.engine.token_utils import load_vocab
from jetstream.third_party.llama3 import llama3_tokenizer
from jetstream.external_tokenizers.llama3 import llama3_tokenizer
import numpy as np
from tqdm.asyncio import tqdm # pytype: disable=pyi-error
import pandas
Expand Down
2 changes: 1 addition & 1 deletion jetstream/engine/token_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
from jetstream.engine import mock_utils
from jetstream.engine import tokenizer_api
from jetstream.engine import tokenizer_pb2
from jetstream.third_party.llama3 import llama3_tokenizer
from jetstream.external_tokenizers.llama3 import llama3_tokenizer

# ResultToken class to store tokens ids.
ResultTokens = Any
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions jetstream/tests/engine/test_token_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def decode(self, t: int) -> str:
class TokenUtilsTest(unittest.TestCase):

def setup_sentencepiece(self):
self.tokenizer_path = "third_party/llama2/tokenizer.model"
self.tokenizer_path = "external_tokenizers/llama2/tokenizer.model"
current_dir = os.path.dirname(__file__)
self.tokenizer_path = os.path.join(current_dir, self.tokenizer_path)
print(f"model_path: {self.tokenizer_path}")
Expand All @@ -66,7 +66,7 @@ def setup_sentencepiece(self):
self.jt_tokenizer = JetStreamTokenizer(self.tokenizer_path)

def setup_tiktoken(self):
self.tokenizer_path = "third_party/llama3/tokenizer.model"
self.tokenizer_path = "external_tokenizers/llama3/tokenizer.model"
current_dir = os.path.dirname(__file__)
self.tokenizer_path = os.path.join(current_dir, self.tokenizer_path)
print(f"model_path: {self.tokenizer_path}")
Expand Down
2 changes: 1 addition & 1 deletion pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
[MAIN]

# Files or directories to be skipped. They should be base names, not paths.
ignore=third_party
ignore=external_tokenizers

# Files or directories matching the regex patterns are skipped. The regex
# matches against base names, not paths.
Expand Down

0 comments on commit 15e3963

Please sign in to comment.