-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Adding syntax for the json config files to actually merge, not override, entries #8044
Comments
Signed-off-by: Boris Fomitchev <[email protected]>
Sounds interesting, maybe adding a Thanks. |
I thing it's best the way I implemented it - we do want to be able to both override some entries and merge others, in the same config file. Most of new inference_trt.json do exactly that. |
Implemented in #7990 |
We would want to selectively choose which keys to merge so the proposed strategy here may work for that. I don't see many places where this would be needed, honestly only the |
@ericspod : yes it's compatible with YAML, I have added unit test to #7990 for both JSOM and YAML. |
One more use case could be something like:
It will extend the random_transforms list. cc @ericspod |
Anything like this adding transforms could be useful, yes. We should test that the syntax adds to the |
I would like to see syntax for the json config files to actually merge, not override, entries.
Like to be able to just add a single import to the import list rather than overriding the whole list, or add a handler to the list of handlers via additional config .json.
Such an option would help a lot.
Describe the solution you'd like
I propose the following syntax:
Instead of having to override the whole list, e.g:
inference.json:
inference_trt.json:
let's allow :
inference_trt.json:
Processing would be : let's add an extra merge pass after the 'override' step, where config entries are overridden by .update().
With '+' key prefix, both the original 'imports' and '+imports' entries will be in the dict.
Additional pass would find all the '+*' entries and perform merge of '+id" key entry into corresponding 'id' key.
Dictionaries will be update()'d, lists append()'ed, error otherwise.
The text was updated successfully, but these errors were encountered: