Skip to content

Remove refinery-config #129

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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 = ""
Expand All @@ -204,4 +198,5 @@ def healthcheck() -> responses.PlainTextResponse:
text = "OK"
return responses.PlainTextResponse(text, status_code=status_code)

session.start_session_cleanup_thread()

session.start_session_cleanup_thread()
31 changes: 0 additions & 31 deletions check_config_service

This file was deleted.

5 changes: 1 addition & 4 deletions controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions start
Original file line number Diff line number Diff line change
@@ -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...'
Expand Down
2 changes: 1 addition & 1 deletion submodules/s3
3 changes: 1 addition & 2 deletions util/config_handler.py
Original file line number Diff line number Diff line change
@@ -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]:
Expand Down