From 9afe0d58e62a8b2de303dc36755354130677606a Mon Sep 17 00:00:00 2001 From: Aisuko Date: Thu, 25 Jul 2024 20:37:08 +1000 Subject: [PATCH] remove load ds (#318) * remove load ds Signed-off-by: Aisuko * fix linter iissue Signed-off-by: Aisuko * remove yeager Signed-off-by: Aisuko --------- Signed-off-by: Aisuko --- backend/src/api/endpoints.py | 2 +- backend/src/api/routes/neural_nets.py | 9 ++++----- backend/src/models/schemas/neural_nets.py | 2 +- backend/src/repository/events.py | 14 -------------- docker-compose.yaml | 22 +++++++++++----------- 5 files changed, 17 insertions(+), 32 deletions(-) diff --git a/backend/src/api/endpoints.py b/backend/src/api/endpoints.py index 3a0c2c7..3cc2c7a 100644 --- a/backend/src/api/endpoints.py +++ b/backend/src/api/endpoints.py @@ -35,4 +35,4 @@ router.include_router(router=version_router) router.include_router(router=health_router) router.include_router(router=datasets_router) -router.include_router(router=neural_nets_router) \ No newline at end of file +router.include_router(router=neural_nets_router) diff --git a/backend/src/api/routes/neural_nets.py b/backend/src/api/routes/neural_nets.py index c0da914..a48a83c 100644 --- a/backend/src/api/routes/neural_nets.py +++ b/backend/src/api/routes/neural_nets.py @@ -22,7 +22,6 @@ oauth2_scheme = OAuth2PasswordBearer(tokenUrl="/api/auth/verify") - @router.get( path="/list", name="nn:get-neural-net-list", @@ -40,11 +39,11 @@ async def get_neural_net_list( { "name": "GPT", "description": "GPT is a transformer-based model", - "modules": ["BigramLanguageModel((token_embedding_table): Embedding(65, 65))","Embedding(65, 65)"] + "modules": ["BigramLanguageModel((token_embedding_table): Embedding(65, 65))", "Embedding(65, 65)"], }, { "name": "Makemore", "description": "Makemore is a character-level language model", - "modules": ["Makemore((token_embedding_table): Embedding(65, 65))","Embedding(65, 65)"] - } - ] \ No newline at end of file + "modules": ["Makemore((token_embedding_table): Embedding(65, 65))", "Embedding(65, 65)"], + }, + ] diff --git a/backend/src/models/schemas/neural_nets.py b/backend/src/models/schemas/neural_nets.py index ffe305b..4dea7d6 100644 --- a/backend/src/models/schemas/neural_nets.py +++ b/backend/src/models/schemas/neural_nets.py @@ -23,4 +23,4 @@ class NeuralnetsResponse(BaseSchemaModel): name: str = Field(..., title="Neural Network Name", description="Neural Network Name") description: Optional[str] = Field(default="Neural nets", title="Description", description="Description") - modules: Optional[list[str]] = Field(default=["Embedding(65, 65)"], title="Modules", description="Modules") \ No newline at end of file + modules: Optional[list[str]] = Field(default=["Embedding(65, 65)"], title="Modules", description="Modules") diff --git a/backend/src/repository/events.py b/backend/src/repository/events.py index 9e509c8..541df16 100644 --- a/backend/src/repository/events.py +++ b/backend/src/repository/events.py @@ -25,7 +25,6 @@ from src.config.settings.const import ANONYMOUS_USER, ANONYMOUS_EMAIL, ANONYMOUS_PASS from src.config.manager import settings from src.models.db.account import Account -from src.models.db.dataset import DataSet from src.securities.hashing.password import pwd_generator from src.repository.database import async_db from src.repository.table import Base @@ -96,18 +95,6 @@ async def initialize_admin_user(async_session: AsyncSession) -> None: loguru.logger.info("Admin user --- Successfully Created!") -async def initialize_rag_datasets(async_session: AsyncSession) -> None: - """ - Initialize ds for RAG - """ - loguru.logger.info("RAG datasets --- Creating . . .") - ds = DataSet(name=settings.DEFAULT_RAG_DS_NAME) - async_session.add(instance=ds) - await async_session.commit() - await async_session.refresh(instance=ds) - loguru.logger.info("RAG datasets --- Successfully Created!") - - async def initialize_db_connection(backend_app: fastapi.FastAPI) -> None: loguru.logger.info("Database Connection --- Establishing . . .") @@ -118,7 +105,6 @@ async def initialize_db_connection(backend_app: fastapi.FastAPI) -> None: async with async_db.async_session as async_session: await initialize_anonymous_user(async_session=async_session) await initialize_admin_user(async_session=async_session) - await initialize_rag_datasets(async_session=async_session) loguru.logger.info("Database Connection --- Successfully Established!") diff --git a/docker-compose.yaml b/docker-compose.yaml index 0ac1e47..83c1601 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -198,17 +198,17 @@ services: - kirin - yeager - yeager: - container_name: yeager - image: ghcr.io/skywardai/yeager:v0.1.0 - restart: always - entrypoint: ["python3", "-m", "tensorboard.main","--port=80","--bind_all","--logdir=${METRICS_PATHS}"] - volumes: - - ${DOCKER_VOLUME_DIRECTORY:-.}/volumes/runs:/app/runs - expose: - - 80 - ports: - - 6006:80 + # yeager: + # container_name: yeager + # image: ghcr.io/skywardai/yeager:v0.1.0 + # restart: always + # entrypoint: ["python3", "-m", "tensorboard.main","--port=80","--bind_all","--logdir=${METRICS_PATHS}"] + # volumes: + # - ${DOCKER_VOLUME_DIRECTORY:-.}/volumes/runs:/app/runs + # expose: + # - 80 + # ports: + # - 6006:80 volumes: