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

Rename third_party folder to Avoid Copybara g3 Errors #148

Merged
merged 3 commits into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
Loading