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 Build component instance from dictionary config #3518

Merged
merged 14 commits into from
Jan 6, 2022

Conversation

Nic-Ma
Copy link
Contributor

@Nic-Ma Nic-Ma commented Dec 20, 2021

Task 2 of #3482 .

Description

This PR implemented the utility to build a component instance from dictionary config, searching from specified packages and modules.

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.
  • In-line docstrings updated.
  • Documentation updated, tested make html command in the docs/ folder.

@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Dec 20, 2021

/black

@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Dec 20, 2021

/build

1 similar comment
@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Dec 20, 2021

/build

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

Nic-Ma commented Dec 20, 2021

/black

@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Dec 20, 2021

/build

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

Nic-Ma commented Dec 20, 2021

/black

@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Dec 20, 2021

/build

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

Nic-Ma commented Dec 20, 2021

/build

Copy link
Contributor

@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.

it seems this is not compatible with the lazy instantiation idea, perhaps we should agree on a proof-of-concept before writing small pull requests.

@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Dec 20, 2021

Hi @wyli ,

Thanks for your review and feedback.
Sorry maybe I didn't describe the PR clearly enough, it doesn't conflict with the lazy instantiation idea, it's only the utility to build one component from the dictionary.
For the lazy instantiation idea, I think it's the logic of handling the whole config content, when it's really necessary to create an instance, it will call this utility to create it. I will implement something like ConfigResolver to handle the whole config for the step 3 of #3482 later when we discussed with more team guys.

Thanks.

@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Dec 20, 2021

/black

@Nic-Ma Nic-Ma force-pushed the 3482-build-objects branch from 5f11e8e to 87495ef Compare December 20, 2021 23:45
@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Dec 20, 2021

/build

Signed-off-by: Nic Ma <nma@nvidia.com>
@Nic-Ma Nic-Ma force-pushed the 3482-build-objects branch from 87495ef to b925f27 Compare December 21, 2021 00:06
@Nic-Ma Nic-Ma requested a review from rijobro December 21, 2021 00:07
@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Dec 21, 2021

/black

@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Dec 21, 2021

/build

@wyli
Copy link
Contributor

wyli commented Dec 21, 2021

Hi @wyli ,

Thanks for your review and feedback. Sorry maybe I didn't describe the PR clearly enough, it doesn't conflict with the lazy instantiation idea, it's only the utility to build one component from the dictionary. For the lazy instantiation idea, I think it's the logic of handling the whole config content, when it's really necessary to create an instance, it will call this utility to create it. I will implement something like ConfigResolver to handle the whole config for the step 3 of #3482 later when we discussed with more team guys.

Thanks.

Maybe there's a misunderstanding here, the lazy instantiation will work at the component level as well. Also, it'll be useful to have a complete prototype and then we divide it into smaller pieces and merge. That'll be an efficient way to roll out a major feature.

@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Dec 21, 2021

Hi @wyli ,
Thanks for your review and feedback. Sorry maybe I didn't describe the PR clearly enough, it doesn't conflict with the lazy instantiation idea, it's only the utility to build one component from the dictionary. For the lazy instantiation idea, I think it's the logic of handling the whole config content, when it's really necessary to create an instance, it will call this utility to create it. I will implement something like ConfigResolver to handle the whole config for the step 3 of #3482 later when we discussed with more team guys.
Thanks.

Maybe there's a misunderstanding here, the lazy instantiation will work at the component level as well. Also, it'll be useful to have a complete prototype and then we divide it into smaller pieces and merge. That'll be an efficient way to roll out a major feature.

OK, sounds good to me.
Let's try to discuss and align with team members on the first step of #3482 (the MVP model package draft structure: Project-MONAI/tutorials#487), then I will develop a complete prototype in a separate branch.

Thanks.

@Nic-Ma Nic-Ma changed the title 3482 Build component instance from dictionary config [WIP] 3482 Build component instance from dictionary config Dec 21, 2021
@Nic-Ma Nic-Ma mentioned this pull request Dec 23, 2021
17 tasks
@Nic-Ma Nic-Ma changed the base branch from dev to 3482-mmar-mvp January 6, 2022 08:30
@Nic-Ma Nic-Ma changed the title [WIP] 3482 Build component instance from dictionary config 3482 Build component instance from dictionary config Jan 6, 2022
@Nic-Ma Nic-Ma merged commit 3c9d2d1 into Project-MONAI:3482-mmar-mvp Jan 6, 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.

3 participants