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

3482 Add ConfigComponent for config parsing #3720

Merged
merged 39 commits into from Feb 18, 2022

Conversation

Nic-Ma
Copy link
Contributor

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

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
Copy link
Contributor Author

Nic-Ma commented Jan 26, 2022

/black

@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Jan 26, 2022

/build

@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Jan 26, 2022

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

Thanks.

wyli
wyli previously requested changes Jan 26, 2022
Copy link
Member

@wyli wyli left a comment

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
Copy link
Contributor Author

Nic-Ma commented Jan 28, 2022

/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
Copy link
Contributor Author

Nic-Ma commented Jan 29, 2022

/build

@wyli
Copy link
Member

wyli commented Feb 2, 2022

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

for this pr,

cc @ericspod @rijobro

@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Feb 5, 2022

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
Copy link
Member

ericspod commented Feb 7, 2022

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
Copy link
Member

wyli commented Feb 8, 2022

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

@ericspod
Copy link
Member

ericspod commented Feb 9, 2022

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
Copy link
Contributor Author

Nic-Ma commented Feb 10, 2022

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
Copy link
Contributor Author

Nic-Ma commented Feb 16, 2022

/black

@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Feb 16, 2022

/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
Copy link
Contributor Author

Nic-Ma commented Feb 16, 2022

/build

1 similar comment
@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Feb 16, 2022

/build

Signed-off-by: Wenqi Li <wenqil@nvidia.com>
Signed-off-by: Wenqi Li <wenqil@nvidia.com>
@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Feb 17, 2022

/build

Signed-off-by: Wenqi Li <wenqil@nvidia.com>
@wyli wyli dismissed their stale review February 17, 2022 00:55

now simplified to the essential components

@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Feb 17, 2022

/black

@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Feb 17, 2022

/build

1 similar comment
@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Feb 17, 2022

/build

Signed-off-by: Nic Ma <nma@nvidia.com>
@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Feb 17, 2022

/build

2 similar comments
@pxLi
Copy link
Contributor

pxLi commented Feb 17, 2022

/build

@pxLi
Copy link
Contributor

pxLi commented Feb 17, 2022

/build

Signed-off-by: Nic Ma <nma@nvidia.com>
@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Feb 17, 2022

/black

@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Feb 17, 2022

/build

1 similar comment
@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Feb 18, 2022

/build

@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Feb 18, 2022

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.

None yet

4 participants