mlem icon indicating copy to clipboard operation
mlem copied to clipboard

Revisit `serve` / `apply-remote` workflow

Open daavoo opened this issue 2 years ago • 1 comments

The API for apply-remote feels a little confusing to me, requiring to pass too much info and args:

mlem apply-remote http test_x.csv -c host="0.0.0.0" -c port=8080 --json

Given that we need to run first mlem serve rf fastapi, would be nice if I could somehow later reference (maybe adding a uid to each server?) this server in a simpler way (haven't though in deep about UI):

# Could just generate a uid automatically (`rf-fastapi`) 
# and/or add a explicit `--name`/`--id` option? 
mlem serve rf fastapi
mlem apply-remote rf-fastapi test_x.csv  --json

Side note. remote sounds confusing to me as it's already used in iterative context for other meanings (i.e. DVC remote).

daavoo avatar May 09 '22 17:05 daavoo

  1. You can save configuration to file and use it instead of options
  2. You can save this id only locally. Even if you save it to repo, how would it know the actual host where you ran it? And it makes little sense to serve and make requests from the same machine, since you can just apply
  3. If you create a deployment, you can actually do it pretty close to what you are describing with mlem deploy apply
  4. server-apply? apply-server? any other suggestions?

mike0sv avatar May 17 '22 00:05 mike0sv

@daavoo, do you have anything to add here? :)

Also looks like this is similar to https://github.com/iterative/mlem/issues/375

aguschin avatar Aug 29 '22 12:08 aguschin

@daavoo, do you have anything to add here? :)

Also looks like this is similar to #375

It is a duplicate :)

daavoo avatar Aug 29 '22 15:08 daavoo