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

Adding Bundle Utility Functions #4324

Merged
merged 26 commits into from
May 26, 2022
Merged

Conversation

ericspod
Copy link
Member

Signed-off-by: Eric Kerfoot eric.kerfoot@kcl.ac.uk

Description

This adds a utility function to bundles load_bundle_config which can be used to load the configuration from a bundle without loading the network. This works on a path pointing to a directory or zip file. A init_bundle script function is added to create a basic bundle directory given a name and initial weights file. This can then be filled in by the user but is useful to demonstrate the correct structure of a bundle.

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.

ericspod and others added 2 commits May 23, 2022 14:50
Signed-off-by: Eric Kerfoot <eric.kerfoot@kcl.ac.uk>
@ericspod ericspod requested review from Nic-Ma and wyli May 24, 2022 10:19
ericspod and others added 2 commits May 24, 2022 11:20
Signed-off-by: Eric Kerfoot <eric.kerfoot@kcl.ac.uk>
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.

looks good to me, init_bundle provides a warm start... @Nic-Ma could please also review this?

ericspod and others added 4 commits May 24, 2022 11:59
Signed-off-by: Eric Kerfoot <eric.kerfoot@kcl.ac.uk>
Signed-off-by: Eric Kerfoot <eric.kerfoot@kcl.ac.uk>
monai/bundle/config_parser.py Show resolved Hide resolved
monai/bundle/scripts.py Show resolved Hide resolved
monai/bundle/scripts.py Outdated Show resolved Hide resolved
monai/bundle/scripts.py Outdated Show resolved Hide resolved
monai/bundle/utils.py Outdated Show resolved Hide resolved
monai/bundle/utils.py Outdated Show resolved Hide resolved
monai/bundle/utils.py Outdated Show resolved Hide resolved
monai/bundle/utils.py Show resolved Hide resolved
monai/bundle/utils.py Show resolved Hide resolved
@Nic-Ma
Copy link
Contributor

Nic-Ma commented May 24, 2022

Hi @ericspod ,

Thanks for the great enhancement of the bundle user experience!
Put some minor comments inline.

Thanks.

Signed-off-by: Eric Kerfoot <eric.kerfoot@kcl.ac.uk>
@ericspod
Copy link
Member Author

There's an issue running the init_bundle script with fire not being present when it should be, the test may not work for Windows either.

ericspod added 5 commits May 24, 2022 14:40
Signed-off-by: Eric Kerfoot <eric.kerfoot@kcl.ac.uk>
Signed-off-by: Eric Kerfoot <eric.kerfoot@kcl.ac.uk>
Signed-off-by: Eric Kerfoot <eric.kerfoot@kcl.ac.uk>
Signed-off-by: Eric Kerfoot <eric.kerfoot@kcl.ac.uk>
Signed-off-by: Eric Kerfoot <eric.kerfoot@kcl.ac.uk>
@ericspod
Copy link
Member Author

@Nic-Ma I think I'm waiting on some CI/CD things to be resolved but once that's done could you review again? Thanks!

@Nic-Ma
Copy link
Contributor

Nic-Ma commented May 25, 2022

@Nic-Ma I think I'm waiting on some CI/CD things to be resolved but once that's done could you review again? Thanks!

Sure, I am blocked by some other tasks today, will try to review it again ASAP tonight.

Thanks for your quick update.

ericspod added 3 commits May 25, 2022 13:04
Signed-off-by: Eric Kerfoot <eric.kerfoot@kcl.ac.uk>
Signed-off-by: Eric Kerfoot <eric.kerfoot@kcl.ac.uk>
Copy link
Contributor

@Nic-Ma Nic-Ma left a comment

Choose a reason for hiding this comment

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

Hi @ericspod ,

Thanks for your quick update.
It overall looks good to me, put some minor comments inline.

Thanks.

monai/bundle/scripts.py Outdated Show resolved Hide resolved
monai/bundle/scripts.py Outdated Show resolved Hide resolved
monai/bundle/utils.py Outdated Show resolved Hide resolved
monai/bundle/utils.py Show resolved Hide resolved
tests/test_bundle_init_bundle.py Show resolved Hide resolved
tests/test_bundle_init_bundle.py Show resolved Hide resolved
tests/test_bundle_utils.py Outdated Show resolved Hide resolved
tests/test_bundle_utils.py Outdated Show resolved Hide resolved
ericspod and others added 3 commits May 25, 2022 17:55
Signed-off-by: Eric Kerfoot <eric.kerfoot@kcl.ac.uk>
Signed-off-by: Eric Kerfoot <eric.kerfoot@kcl.ac.uk>
@ericspod ericspod enabled auto-merge (squash) May 25, 2022 19:56
@Nic-Ma
Copy link
Contributor

Nic-Ma commented May 26, 2022

/build

1 similar comment
@Nic-Ma
Copy link
Contributor

Nic-Ma commented May 26, 2022

/build

@Nic-Ma
Copy link
Contributor

Nic-Ma commented May 26, 2022

Depends on #4355 to merge first.

Thanks.

@wyli
Copy link
Contributor

wyli commented May 26, 2022

/build

@wyli
Copy link
Contributor

wyli commented May 26, 2022

/build

@ericspod ericspod merged commit b892aa5 into Project-MONAI:dev May 26, 2022
@ericspod ericspod deleted the bundle_utils branch May 26, 2022 22:04
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