File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 10
10
import bentoml
11
11
import mlflow
12
12
13
- mlflow .set_tracking_uri (uri = "http://mlflow-server:5000" )
14
- mlflow .set_experiment ("fraud_detection" )
13
+ if (Variable .get ("isProd" ) == "true" ):
14
+ mlflow .set_tracking_uri (uri = "http://mlflow-server:5000" )
15
+ mlflow .set_experiment ("fraud_detection" )
15
16
16
17
def build_model (** kwargs ):
17
- mlflow .autolog ()
18
18
with mlflow .start_run ():
19
19
if (Variable .get ("isProd" ) == "true" ):
20
+ mlflow .autolog ()
20
21
engine = create_engine ("postgresql+psycopg2://" + Variable .get ("db_username" ) + ":" + Variable .get ("db_password" ) + "@" + Variable .get ("db_host" ) + ":" + Variable .get ("db_port" ) + "/" + Variable .get ("db_name" ))
21
- data = pd .read_sql ("select * from public.sample_data limit 6362120 " , engine )
22
+ data = pd .read_sql ("select * from public.sample_data" , engine )
22
23
else :
23
24
data = pd .read_csv ('/opt/airflow/dags/sample_data/Fraud.csv' )
24
25
You can’t perform that action at this time.
0 commit comments