Closed xuf12 closed 2 years ago
Hey, thanks for bringing this up! To help me diagnose--are you able to make predictions in the browser (say url/__docs__
)?
yes that works
I will also add you as a user to the new API deployment so that you can access it for further testing.
Hey! Just checked this out-- try removing the trailing slash (should look like /predict
, not /predict/
) on the v0.1.6
endpoint. :) this was updated to match the R side! I tested this on your endpoint, and it seems to work okay, so I am closing this issue. Feel free to reopen it if this is not the case!
@isabelizimm reopening this as I am running in the same issue as @xuf12 with a new Vetiver API deployed using 0.1.6 https://colorado.rstudio.com/rsc/bike-predict-python-api/
from vetiver.server import predict, vetiver_endpoint
endpoint = vetiver_endpoint("https://colorado.rstudio.com/rsc/bike-predict-python-api/predict")
endpoint
import pandas as pd
new_dict = {
"id": [121],
"hour": [1],
"month": [1],
"Friday": [0],
"Monday": [0],
"Saturday": [0],
"Sunday": [1],
"Thursday": [0],
"Tuesday": [0],
"Wednesday": [0]
}
new_df = pd.DataFrame(new_dict)
new_df
predict(endpoint, new_df)
Hi Gagan-- it looks like you need authentication for your endpoint. Try this ⬇️
h = { 'Authorization': f'Key {api_key}' }
predict(endpoint, new_df, headers = h)
Describe the bug I get this error when predicting with both 0.1.5 and 0.1.6 versions of vetiver using an endpoint deployed with version 0.1.6 of vetiver from PyPI.
To Reproduce Steps to reproduce the behavior:
Expected behavior I expect endpoint_160 to work the same way as endpoint_150.
Screenshots If applicable, add screenshots to help explain your problem.
@gsingh91