MONAI
MONAI copied to clipboard
[WIP] 4901 keychain
Fixes #4901
Description
Add functions in ConfigParser
Status
WIP
Types of changes
- [x] Non-breaking change (fix or new feature that would not break existing functionality).
- [ ] Breaking change (fix or new feature that would cause existing functionality to change).
- [x] New tests added to cover the changes.
- [ ] Integration tests passed locally by running
./runtests.sh -f -u --net --coverage
. - [ ] Quick tests passed locally by running
./runtests.sh --quick --unittests --disttests
. - [ ] In-line docstrings updated.
- [ ] Documentation updated, tested
make html
command in thedocs/
folder.
Hi @mingxin-zheng @dongyang0122 @wyli ,
I have a question about the feature in this PR:
As we already have the config management and parsing logic in bundle, can we drop the "key chain" in Auto3D?
Unify to use the same representation (AAA#BBB#CCC#2#DDD
) for nested keys as bundle?
What do you think?
Thanks.
@Nic-Ma I have the same goal. After the auto3dseg is merged, I will use recursive_get_key_chains
(which outputs "AAA#BBB#CCC" lists) with other recursive get/set in ConfigParser to replace key chains.
Meanwhile, I guess some users may still use the key chain. So I wanted to provide a convenient function if they need to convert from the key chain to ConfigParser convert_key_chain_to_id
Hi @mingxin-zheng ,
Actually, I feel we should not expect users to use both key chain
and bundle config ID
.
Better to unify to "AAA#BBB#CCC"?
@wyli What do you think?
Thanks.
Hi @mingxin-zheng ,
Actually, I feel we should not expect users to use both
key chain
andbundle config ID
. Better to unify to "AAA#BBB#CCC"? @wyli What do you think?Thanks.
A minor point: I don't know how to name the format of "AAA#BBB#CCC", so I just name it id
in the function name convert_key_chain_to_id
. It shouldn't be confused with other things, and name suggestion is welcomed.