MONAI icon indicating copy to clipboard operation
MONAI copied to clipboard

[WIP] 4901 keychain

Open mingxin-zheng opened this issue 2 years ago • 1 comments

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 the docs/ folder.

mingxin-zheng avatar Aug 12 '22 14:08 mingxin-zheng

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 avatar Aug 13 '22 03:08 Nic-Ma

@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

mingxin-zheng avatar Aug 16 '22 05:08 mingxin-zheng

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.

Nic-Ma avatar Aug 16 '22 08:08 Nic-Ma

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.

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.

mingxin-zheng avatar Aug 16 '22 09:08 mingxin-zheng