Skip to content

Commit

Permalink
Quickfix of memory issue when loading models on multiple threads
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeXydas committed Aug 18, 2023
1 parent ab53b4d commit a53c2c7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/config/backend-providers-recommender-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ VERSION_NAME: "v2"
MODE: "PROVIDERS-RECOMMENDER"

FASTAPI:
WORKERS: 4
WORKERS: 1
DEBUG: False
RELOAD: False
HOST: '0.0.0.0'
PORT: 4559

SCHEDULING:
EVERY_N_HOURS: 1
EVERY_N_HOURS: 6

CREDENTIALS: "credentials.yml"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ def create_text_embeddings():
text_embeddings = [(service_id, get_sbert_embeddings(text_service))
for service_id, text_service in tqdm(
list(zip(service_ids, service_texts)),
desc="Service text embeddings"
desc="Service text embeddings",
disable=not APP_SETTINGS['BACKEND']['PROD']
)]

elif APP_SETTINGS["BACKEND"]["SIMILAR_SERVICES"]['METHOD'] == 'TF-IDF':
Expand Down

0 comments on commit a53c2c7

Please sign in to comment.