Skip to content

Commit 71df4d5

Browse files
authored
Merge pull request #813 from EleutherAI/fix-tok-import
fix unexpected indent error for conditional `tiktoken` import
2 parents a5c2229 + 019da08 commit 71df4d5

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

configs/neox_arguments.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ Logging Arguments
111111

112112
- **git_hash**: str
113113

114-
Default = 496f987
114+
Default = 5face7a
115115

116116
current git hash of repository
117117

megatron/tokenizer/tokenizer.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -352,11 +352,11 @@ def eod(self):
352352

353353
class TiktokenTokenizer(AbstractTokenizer):
354354
"""Tokenizer from OpenAI's tiktoken implementation"""
355-
try:
356-
import tiktoken
357-
except ModuleNotFoundError:
358-
print("Please install tiktoken: (https://github.com/openai/tiktoken)")
359-
raise Exception
355+
try:
356+
import tiktoken
357+
except ModuleNotFoundError:
358+
print("Please install tiktoken: (https://github.com/openai/tiktoken)")
359+
raise Exception
360360

361361
def __init__(self, vocab_file):
362362
name = "TiktokenTokenizer"

0 commit comments

Comments
 (0)