Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Make it more convenient to work with dictionary type parameters in bash commands #11

Open
nxexox opened this issue Oct 18, 2023 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@nxexox
Copy link
Owner

nxexox commented Oct 18, 2023

Problem

When I use bash commands and want to specify additional dictionary type configuration options, I need to specify the entire dictionary with escape.

mlup run -m model.onnx --up.uvicorn_kwargs='{"workers": 4, "timeout_graceful_shutdown": 10}'

Solution

Add the ability to specify dictionary keys for each key separately.

mlup run -m model.onnx --up.uvicorn_kwargs.workers=4 --up.uvicorn_kwargs.timeout_graceful_shutdown=10

But you need to leave the current format for installing the parameter dictionary. The parameters must be applied sequentially - first the entire dictionary, and then the point parameters in it will be replaced.

mlup run -m model.onnx --up.uvicorn_kwargs.workers=2 --up.uvicorn_kwargs='{"workers": 4, "timeout_graceful_shutdown": 10}'

В итоге словарь uvicorn_kwargs будет иметь вид: {"workers": 2, "timeout_graceful_shutdown": 10}.

Dictionary type parameters:

  • mlup.ml.conf.storage_kwargs
  • mlup.web.conf.uvicorn_kwargs
@nxexox nxexox added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant