File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed
Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change 99 train_model :
1010 runs-on : ubuntu-latest
1111 steps :
12+ - name : Set up environment variables
13+ run : echo "MLFLOW_TRACKING_URI=${{ secrets.MLFLOW_TRACKING_URI }}" >> $GITHUB_ENV
14+
1215 - uses : actions/checkout@v3
1316
1417 - name : Install uv
Original file line number Diff line number Diff line change 6060mlflow .set_tracking_uri (os .getenv ("MLFLOW_TRACKING_URI" ))
6161print (os .getenv ("ASD" ))
6262model_uri = "models:/taxi_fare_prediction.taxi_fare_model@latest-model"
63- pipe = mlflow .sklearn .load_model (model_uri )
6463
6564app = FastAPI ()
6665
@@ -82,6 +81,7 @@ async def read_root():
8281
8382@app .post ("/predict" )
8483async def predict_one (data : InferenceInput ) -> dict [str , float ]:
84+ pipe = mlflow .sklearn .load_model (model_uri )
8585 df_input = pd .DataFrame ([data .dict ()])
8686
8787 prediction = pipe .predict (df_input )
You can’t perform that action at this time.
0 commit comments