Skip to content

Remove refinery-config #87

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 8 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
7 changes: 0 additions & 7 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from pydantic import BaseModel
from submodules.model.business_objects import general
import util
import config_handler
from submodules.model import session

app = FastAPI()
Expand Down Expand Up @@ -74,12 +73,6 @@ def helper_function(function_name: str) -> responses.JSONResponse:
)


@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 Down
51 changes: 0 additions & 51 deletions config_handler.py

This file was deleted.

12 changes: 0 additions & 12 deletions service_overview.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,13 @@ class Service(Enum):
AC_EXEC_ENV = "AC_EXEC_ENV"
ADMIN_DASHBOARD = "ADMIN_DASHBOARD"
AUTHORIZER = "AUTHORIZER"
CONFIG = "CONFIG"
EMBEDDER = "EMBEDDER"
ENTRY = "ENTRY"
GATEWAY = "GATEWAY"
LF_EXEC_ENV = "LF_EXEC_ENV"
ML_EXEC_ENV = "ML_EXEC_ENV"
MODEL_PROVIDER = "MODEL_PROVIDER"
NEURAL_SEARCH = "NEURAL_SEARCH"
REFINERY = "REFINERY"
TOKENIZER = "TOKENIZER"
UI = "UI"
UPDATER = "UPDATER"
Expand All @@ -41,11 +39,6 @@ class Service(Enum):
"link": "https://github.com/code-kern-ai/refinery-authorizer",
"public_repo": True,
},
Service.CONFIG: {
"name": "Config",
"link": "https://github.com/code-kern-ai/refinery-config",
"public_repo": True,
},
Service.EMBEDDER: {
"name": "Embedder",
"link": "https://github.com/code-kern-ai/refinery-embedder",
Expand Down Expand Up @@ -81,11 +74,6 @@ class Service(Enum):
"link": "https://github.com/code-kern-ai/refinery-neural-search",
"public_repo": True,
},
Service.REFINERY: {
"name": "Refinery",
"link": "https://github.com/code-kern-ai/refinery",
"public_repo": True,
},
Service.TOKENIZER: {
"name": "Tokenizer",
"link": "https://github.com/code-kern-ai/refinery-tokenizer",
Expand Down
18 changes: 3 additions & 15 deletions upgrade_logic/business_objects/gateway.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import os
import re
import requests
from config_handler import get_config_value
from submodules.model.business_objects import (
attribute,
embedding,
Expand Down Expand Up @@ -96,11 +95,6 @@ def gateway_1_14_0_add_cognition_strategy_complexity() -> bool:
)
return False

is_managed = get_config_value("is_managed")
if not is_managed:
print("Not managed. Skipping cognition strategy complexity update.")
return False

response = requests.post(
f"{cognition_url}/api/v1/strategies/internal/calculate_missing_complexities"
)
Expand Down Expand Up @@ -191,15 +185,9 @@ def gateway_1_8_1() -> bool:


def __gateway_1_8_1_add_organization_limits() -> bool:
is_managed = get_config_value("is_managed")
if is_managed:
max_rows = 50000
max_cols = 25
max_char_count = 100000
else:
max_rows = get_config_value("max_rows") or 50000
max_cols = get_config_value("max_cols") or 25
max_char_count = get_config_value("max_char_count") or 100000
max_rows = 50000
max_cols = 25
max_char_count = 100000

print(
"Add default limit for organizations",
Expand Down