justKevv commited on
Commit
a9a2a30
·
1 Parent(s): a6e75ea

fix(logging): fix some warning to not appear and switching the

Browse files
Files changed (2) hide show
  1. app.py +5 -0
  2. requirements.txt +1 -1
app.py CHANGED
@@ -2,11 +2,16 @@ from fastapi import FastAPI
2
  from controller import Controller
3
  from database import Database
4
  import logging
 
 
5
 
6
  app = FastAPI()
7
  database = Database()
8
 
9
  logger = logging.getLogger(__name__)
 
 
 
10
 
11
  @app.get("/")
12
  def greet_json():
 
2
  from controller import Controller
3
  from database import Database
4
  import logging
5
+ import warnings
6
+ from sklearn.exceptions import InconsistentVersionWarning
7
 
8
  app = FastAPI()
9
  database = Database()
10
 
11
  logger = logging.getLogger(__name__)
12
+ warnings.filterwarnings('ignore', category=InconsistentVersionWarning)
13
+
14
+ logging.getLogger('absl').setLevel(logging.ERROR)
15
 
16
  @app.get("/")
17
  def greet_json():
requirements.txt CHANGED
@@ -6,5 +6,5 @@ joblib
6
  keras
7
  numpy
8
  pandas
9
- scikit-learn
10
  xgboost
 
6
  keras
7
  numpy
8
  pandas
9
+ scikit-learn==1.6.1
10
  xgboost