You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Set the environment variable to prevent caching
os.environ['TIKTOKEN_CACHE_DIR'] = ""
# Identify the cache directory
cache_dir = os.path.join(tempfile.gettempdir(), "data-gym-cache")
print(f"Cache directory: {cache_dir}")
# Check if the cache directory exists and clear it if it does
if os.path.exists(cache_dir):
print("Cache directory found. Attempting to clear it...")
shutil.rmtree(cache_dir)
print("Cache directory cleared.")
else:
print("Cache directory does not exist.")
Tried re installing tiktoken
Any ideas on how I could fix this error?
Thanks in advance!
The text was updated successfully, but these errors were encountered:
aryagxr
changed the title
Unknown encoding gpt-2
Unknown encoding gpt2
May 22, 2024
This is the code I'm trying to run
tokenizer = tiktoken.get_encoding("gpt2")
and this is the error I get:
From issue #51, here is the full log:
Here is what I tried: (Solutions from #63 )
Any ideas on how I could fix this error?
Thanks in advance!
The text was updated successfully, but these errors were encountered: