Skip to content

Commit

Permalink
fix: set TOKENIZERS_PARALLELISM env var to false to get rid of warning
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikBjare committed Dec 8, 2024
1 parent 696e722 commit 75b298b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions gptme/init.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import atexit
import logging
import os
from typing import cast

from dotenv import load_dotenv
Expand Down Expand Up @@ -32,6 +33,10 @@ def init(model: str | None, interactive: bool, tool_allowlist: list[str] | None)
logger.debug("Started")
load_dotenv()

# fixes issues with transformers parallelism
# which also leads to "Context leak detected, msgtracer returned -1"
os.environ["TOKENIZERS_PARALLELISM"] = "false"

config = get_config()

# get from config
Expand Down

0 comments on commit 75b298b

Please sign in to comment.