Skip to content

3482 Add ConfigComponent for config parsing#3720

Merged
Nic-Ma merged 39 commits into
Project-MONAI:devfrom
Nic-Ma:3482-add-configcomponent
Feb 18, 2022
Merged

3482 Add ConfigComponent for config parsing#3720
Nic-Ma merged 39 commits into
Project-MONAI:devfrom
Nic-Ma:3482-add-configcomponent

Conversation

@Nic-Ma

@Nic-Ma Nic-Ma commented Jan 26, 2022

Copy link
Copy Markdown
Contributor

Task step 2 of #3482 .

Description

This PR implemented the ConfigComponent feature for config parsing, it's for task 2 of #3482 .
The whole proposal is in draft PR: #3593.

Status

Ready

Types of changes

  • 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).
  • 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.

@Nic-Ma

Nic-Ma commented Jan 26, 2022

Copy link
Copy Markdown
Contributor Author

/black

@Nic-Ma

Nic-Ma commented Jan 26, 2022

Copy link
Copy Markdown
Contributor Author

/build

@Nic-Ma

Nic-Ma commented Jan 26, 2022

Copy link
Copy Markdown
Contributor Author

I tried to cover all the possible config cases in the unit tests.

Thanks.

@Nic-Ma Nic-Ma requested review from ericspod, rijobro and wyli January 26, 2022 17:03
wyli
wyli previously requested changes Jan 26, 2022

@wyli wyli left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Still under discussion)

@Nic-Ma Nic-Ma changed the title 3482 Add ConfigComponent for config parsing [WIP] 3482 Add ConfigComponent for config parsing Jan 26, 2022
@Nic-Ma

Nic-Ma commented Jan 28, 2022

Copy link
Copy Markdown
Contributor Author

/build

@Nic-Ma Nic-Ma changed the title [WIP] 3482 Add ConfigComponent for config parsing 3482 Add ConfigComponent for config parsing Jan 29, 2022
@Nic-Ma Nic-Ma requested a review from wyli January 29, 2022 07:54
@Nic-Ma

Nic-Ma commented Jan 29, 2022

Copy link
Copy Markdown
Contributor Author

/build

@wyli

wyli commented Feb 2, 2022

Copy link
Copy Markdown
Contributor

I'm still looking into the existing implementations outside of monai...

for this pr,

cc @ericspod @rijobro

@Nic-Ma

Nic-Ma commented Feb 5, 2022

Copy link
Copy Markdown
Contributor Author

Thanks for @wyli 's review and suggestions.

Hi @ericspod @rijobro ,

Could you please help also take a look and share some opinions?
I will come back to work on this ticket tomorrow.

Thanks in advance.

@ericspod

ericspod commented Feb 7, 2022

Copy link
Copy Markdown
Member

Hydra does do some of the things we want to include here, do we want to add it as a dependency? I'm not sure it could be an optional dependency since the model archiving functionality would need it to be there and it's a pretty important that it's present in MONAI.

@wyli

wyli commented Feb 8, 2022

Copy link
Copy Markdown
Contributor

this one also looks interesting https://github.com/jmespath/jmespath.py

@ericspod

ericspod commented Feb 9, 2022

Copy link
Copy Markdown
Member

this one also looks interesting https://github.com/jmespath/jmespath.py

Something structured like this looks like a good idea, I do like the "foo.baz" syntax. It's rather more complex that we need for this application perhaps, again though the concern is adding another dependency.

I have a bit of code in a tool for generating random data that instantiates objects from a YAML schema. This function to creates objects from the dictionary derived from the schema recursively so that new objects can be used as constructor arguments when instantiating others. The find_type_def is pretty well the same as get_class and much of the other code here is doing a very similar thing.

I'm good with this going forward if we want to keep the momentum going on the model archive.

@ericspod ericspod mentioned this pull request Feb 9, 2022
17 tasks
@Nic-Ma

Nic-Ma commented Feb 10, 2022

Copy link
Copy Markdown
Contributor Author

Hi @ericspod @wyli ,

Thanks very much for your review and comments, suggestions.
I was busy with NVIDIA Clara issues when came back from the Chinese New Year holiday this week, now I am checking other repos' implementations of config parsing and trying to resolve your comments.

Thanks.

@Nic-Ma Nic-Ma changed the title 3482 Add ConfigComponent for config parsing [WIP] 3482 Add ConfigComponent for config parsing Feb 16, 2022
@Nic-Ma Nic-Ma changed the title [WIP] 3482 Add ConfigComponent for config parsing 3482 Add ConfigComponent for config parsing Feb 16, 2022
@Nic-Ma

Nic-Ma commented Feb 16, 2022

Copy link
Copy Markdown
Contributor Author

/black

@Nic-Ma

Nic-Ma commented Feb 16, 2022

Copy link
Copy Markdown
Contributor Author

/build

@Nic-Ma Nic-Ma requested a review from wyli February 16, 2022 17:06
Signed-off-by: Nic Ma <nma@nvidia.com>
@Nic-Ma Nic-Ma force-pushed the 3482-add-configcomponent branch from e92a3ee to aa5f95d Compare February 16, 2022 17:08
@Nic-Ma

Nic-Ma commented Feb 16, 2022

Copy link
Copy Markdown
Contributor Author

/build

1 similar comment
@Nic-Ma

Nic-Ma commented Feb 16, 2022

Copy link
Copy Markdown
Contributor Author

/build

wyli added 2 commits February 16, 2022 19:10
Signed-off-by: Wenqi Li <wenqil@nvidia.com>
Signed-off-by: Wenqi Li <wenqil@nvidia.com>
@Nic-Ma

Nic-Ma commented Feb 17, 2022

Copy link
Copy Markdown
Contributor Author

/build

Signed-off-by: Wenqi Li <wenqil@nvidia.com>
@wyli wyli force-pushed the 3482-add-configcomponent branch from 7804756 to 3ac8827 Compare February 17, 2022 00:50
@wyli wyli dismissed their stale review February 17, 2022 00:55

now simplified to the essential components

@Nic-Ma

Nic-Ma commented Feb 17, 2022

Copy link
Copy Markdown
Contributor Author

/black

@Nic-Ma

Nic-Ma commented Feb 17, 2022

Copy link
Copy Markdown
Contributor Author

/build

1 similar comment
@Nic-Ma

Nic-Ma commented Feb 17, 2022

Copy link
Copy Markdown
Contributor Author

/build

Signed-off-by: Nic Ma <nma@nvidia.com>
@Nic-Ma Nic-Ma force-pushed the 3482-add-configcomponent branch from 6e53dcd to 6d0aa5d Compare February 17, 2022 04:38
@Nic-Ma

Nic-Ma commented Feb 17, 2022

Copy link
Copy Markdown
Contributor Author

/build

2 similar comments
@pxLi

pxLi commented Feb 17, 2022

Copy link
Copy Markdown
Contributor

/build

@pxLi

pxLi commented Feb 17, 2022

Copy link
Copy Markdown
Contributor

/build

Signed-off-by: Nic Ma <nma@nvidia.com>
@Nic-Ma

Nic-Ma commented Feb 17, 2022

Copy link
Copy Markdown
Contributor Author

/black

@Nic-Ma

Nic-Ma commented Feb 17, 2022

Copy link
Copy Markdown
Contributor Author

/build

1 similar comment
@Nic-Ma

Nic-Ma commented Feb 18, 2022

Copy link
Copy Markdown
Contributor Author

/build

@Nic-Ma

Nic-Ma commented Feb 18, 2022

Copy link
Copy Markdown
Contributor Author

I have merged this PR into the whole draft PR: #3593 and verified the overall features.
Will merge this PR and create following PRs for other parts.

Thanks.

@Nic-Ma Nic-Ma merged commit 894e989 into Project-MONAI:dev Feb 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants