e1250 commited on
Commit
b4627df
·
1 Parent(s): 84dbb52

fix: for backend production

Browse files
Files changed (2) hide show
  1. main.py +2 -0
  2. requirements.txt +1 -1
main.py CHANGED
@@ -13,6 +13,7 @@ from infra.logger_structlog import StructLogger
13
  import asyncio
14
  import mlflow
15
  from backend.utils.experiment import log_config
 
16
 
17
  @asynccontextmanager
18
  async def lifespan(app: FastAPI):
@@ -48,6 +49,7 @@ async def lifespan(app: FastAPI):
48
  yield
49
 
50
  logger.warn("Shutting down the server....")
 
51
  # You can remove connections and release gpu here .
52
 
53
  mlflow.set_tracking_uri("sqlite:///config/logs/mlflow.db")
 
13
  import asyncio
14
  import mlflow
15
  from backend.utils.experiment import log_config
16
+ import torch
17
 
18
  @asynccontextmanager
19
  async def lifespan(app: FastAPI):
 
49
  yield
50
 
51
  logger.warn("Shutting down the server....")
52
+ torch.cuda.empty_cache()
53
  # You can remove connections and release gpu here .
54
 
55
  mlflow.set_tracking_uri("sqlite:///config/logs/mlflow.db")
requirements.txt CHANGED
@@ -8,4 +8,4 @@ pydantic
8
  pydantic_settings
9
  structlog
10
 
11
- tracking_system_ai@git+https://github.com/E1250/p-tracking_system.git
 
8
  pydantic_settings
9
  structlog
10
 
11
+ tracking_system@git+https://github.com/E1250/p-tracking_system.git