diff --git a/sweepai/config/server.py b/sweepai/config/server.py index 0b09e60eb6..fd48e738b6 100644 --- a/sweepai/config/server.py +++ b/sweepai/config/server.py @@ -30,9 +30,11 @@ "SENTENCE_TRANSFORMERS_MODEL", "sentence-transformers/all-MiniLM-L6-v2", # "all-mpnet-base-v2" ) -BATCH_SIZE = int( +from sweepai.utils.multiprocessing_utils import safe_multiprocessing_setup + +BATCH_SIZE = safe_multiprocessing_setup(int( os.environ.get("BATCH_SIZE", 256) -) # Tune this to 32 for sentence-transformers/all-MiniLM-L6-v2 on CPU +)) # Tune this to 32 for sentence-transformers/all-MiniLM-L6-v2 on CPU TEST_BOT_NAME = "sweep-nightly[bot]" ENV = os.environ.get("ENV", "dev")