sol-eng / bike_predict

A demo of an end-to-end machine learning pipeline, using Posit Connect
92 stars 31 forks source link

update vetiver deployment #37

Closed gsingh91 closed 1 year ago

gsingh91 commented 1 year ago

Updating vetiver deployment to Connect to use vetiver native function.

@SamEdwardes I am having issues testing the deployment from Colorado Workbench, but I was able to test it locally on open source Desktop. Can you please test it once in your workbench env and merge? Thanks!

gsingh91 commented 1 year ago

@SamEdwardes done. Please review.

juliasilge commented 1 year ago

Am I understanding correctly that when you have a script running on Connect that deploys an API to the same Connect server, you need to specify a user in that script?

SamEdwardes commented 1 year ago

Thanks Gagan - this is on my to-do list.


@juliasilge

Am I understanding correctly that when you have a script running on Connect that deploys an API to the same Connect server, you need to specify a user in that script?

I am interested in your input here, but I think we do:

However, I would prefer if we did not have to do this and could publish without having to run the add functions. For example:

vetiver_deploy_rsconnect(
  connect_server = "https://connect.example.com",
  connect_api_key = Sys.getenv("CONNECT_API_KEY"),
  board = board,
  name = pin_name,
  version = NULL,
  launch.browser = FALSE,
  appTitle = "Bike Predict - Model - API",
  predict_args = list(debug = FALSE),
)
SamEdwardes commented 1 year ago

@SamEdwardes done. Please review.

I did some testing and it looks like everything is working. I made a few small updates:

juliasilge commented 1 year ago

I agree that it would be better if rsconnect (the R package) knew to look up the server and user if something like deployApp() was being executed on Connect itself.