mlem
mlem copied to clipboard
Revisit `serve` / `apply-remote` workflow
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).
- You can save configuration to file and use it instead of options
- 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 justapply
- If you create a deployment, you can actually do it pretty close to what you are describing with
mlem deploy apply
-
server-apply
?apply-server
? any other suggestions?
@daavoo, do you have anything to add here? :)
Also looks like this is similar to https://github.com/iterative/mlem/issues/375
@daavoo, do you have anything to add here? :)
Also looks like this is similar to #375
It is a duplicate :)