diff --git a/app.py b/app.py index bd8da00..dd485ac 100644 --- a/app.py +++ b/app.py @@ -6,7 +6,7 @@ import torch from submodules.model.business_objects import general -from util import request_util, config_handler +from util import request_util from submodules.model import session app = FastAPI() @@ -185,12 +185,6 @@ def calc_tensor( ) -@app.put("/config_changed") -def config_changed() -> responses.PlainTextResponse: - config_handler.refresh_config() - return responses.PlainTextResponse(status_code=status.HTTP_200_OK) - - @app.get("/healthcheck") def healthcheck() -> responses.PlainTextResponse: text = "" @@ -204,4 +198,5 @@ def healthcheck() -> responses.PlainTextResponse: text = "OK" return responses.PlainTextResponse(text, status_code=status_code) -session.start_session_cleanup_thread() \ No newline at end of file + +session.start_session_cleanup_thread() diff --git a/check_config_service b/check_config_service deleted file mode 100644 index 00bd9d4..0000000 --- a/check_config_service +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash -CONFIG_EXISTS=0 -if [ -n "$(docker ps -q -f name=dev-setup_refinery-config_1)" ] -then - if [ "$( docker container inspect -f '{{.State.Status}}' dev-setup_refinery-config_1 )" == "running" ]; - then - CONFIG_EXISTS=1 - fi -elif [ -n "$(docker ps -q -f name=dev-setup-refinery-config-1)" ] -then - if [ "$( docker container inspect -f '{{.State.Status}}' dev-setup-refinery-config-1 )" == "running" ]; - then - CONFIG_EXISTS=1 - fi -else - if [ -n "$(docker ps -q -f name=refinery-config)" ]; - then - if [ "$( docker container inspect -f '{{.State.Status}}' refinery-config )" == "running" ]; - then - CONFIG_EXISTS=1 - fi - fi -fi -if [ $CONFIG_EXISTS -eq 0 ] -then - echo "refinery-config couldn't be found - exit" - exit 1 -else - echo "refinery-config found -> proceeding" -fi - diff --git a/controller.py b/controller.py index 32936a5..37d4dc6 100644 --- a/controller.py +++ b/controller.py @@ -23,7 +23,6 @@ from typing import Any, Dict, Iterator, List, Optional from util import daemon, request_util -from util.config_handler import get_config_value from util.decorator import param_throttle from util.embedders import get_embedder from util.notification import send_project_update, embedding_warning_templates @@ -208,9 +207,7 @@ def run_encoding( iso2_code = project.get_blank_tokenizer_from_project(project_id) try: if platform == "huggingface": - if not __is_embedders_internal_model(model) and get_config_value( - "is_managed" - ): + if not __is_embedders_internal_model(model): config_string = request_util.get_model_path(model) if isinstance(config_string, dict): config_string = model diff --git a/start b/start index ef5d653..7a0b110 100755 --- a/start +++ b/start @@ -1,8 +1,6 @@ #!/bin/bash trap "echo -ne '\nstopping container...' && docker stop refinery-embedder > /dev/null 2>&1 && echo -ne '\t\t [done]\n'" EXIT -source check_config_service - HOST_IP=$(docker network inspect bridge --format='{{json .IPAM.Config}}' | grep -o '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}' | tail -1) echo -ne 'stopping old container...' diff --git a/submodules/model b/submodules/model index 3af110d..2019057 160000 --- a/submodules/model +++ b/submodules/model @@ -1 +1 @@ -Subproject commit 3af110d28d90152c62b40d6676bec40ae50fc132 +Subproject commit 201905750781aefb9dcca53a5389144e73edd775 diff --git a/submodules/s3 b/submodules/s3 index 1ad3ff5..3299fb4 160000 --- a/submodules/s3 +++ b/submodules/s3 @@ -1 +1 @@ -Subproject commit 1ad3ff584860090f4e215986f334b5e63759a55d +Subproject commit 3299fb46876e3b4cc29c0a5cef004005a87f0f19 diff --git a/util/config_handler.py b/util/config_handler.py index b3dd737..a7dfb04 100644 --- a/util/config_handler.py +++ b/util/config_handler.py @@ -1,13 +1,12 @@ from typing import Dict, Any, Optional, Union import requests -import json import time from util import daemon __config = None # meant as a const value since env variables will be removed at some point -REQUEST_URL = "http://refinery-config:80/full_config" +REQUEST_URL = "http://refinery-gateway:80/full_config" def __get_config() -> Dict[str, Any]: