Skip to content

2630 adds look_up_option#2631

Merged
wyli merged 6 commits intoProject-MONAI:devfrom
wyli:2630-utility-look-up
Jul 21, 2021
Merged

2630 adds look_up_option#2631
wyli merged 6 commits intoProject-MONAI:devfrom
wyli:2630-utility-look-up

Conversation

@wyli
Copy link
Copy Markdown
Contributor

@wyli wyli commented Jul 20, 2021

Signed-off-by: Wenqi Li [email protected]

Fixes #2630

Description

  • adds a look up option
  • update the Enum usage to support closest match guesses

Status

Ready

Types of changes

  • Non-breaking change (fix or new feature that would not break existing functionality).
  • breaking change mostly for the type of errors for unsupported options, from KeyError to ValueError
  • 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.

Signed-off-by: Wenqi Li <[email protected]>
@wyli wyli changed the title [wip] 2630 adds look_up_options [wip] 2630 adds look_up_option Jul 20, 2021
wyli added 2 commits July 20, 2021 15:09
Signed-off-by: Wenqi Li <[email protected]>
Signed-off-by: Wenqi Li <[email protected]>
@wyli wyli force-pushed the 2630-utility-look-up branch from 589e90b to d121f8f Compare July 20, 2021 15:14
@wyli wyli changed the title [wip] 2630 adds look_up_option 2630 adds look_up_option Jul 20, 2021
Signed-off-by: Wenqi Li <[email protected]>
@wyli wyli force-pushed the 2630-utility-look-up branch from d121f8f to ce97dc1 Compare July 20, 2021 15:52
@wyli
Copy link
Copy Markdown
Contributor Author

wyli commented Jul 20, 2021

/black
/integration-test

@wyli
Copy link
Copy Markdown
Contributor Author

wyli commented Jul 20, 2021

/build

Signed-off-by: Wenqi Li <[email protected]>
@wyli wyli force-pushed the 2630-utility-look-up branch from 0e0e439 to 05bee86 Compare July 20, 2021 22:13
Copy link
Copy Markdown
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.

Thanks for the enhancement, I put some minor comments inline.
Others look good to me.
@ericspod could you please help double confirm the implementation of damerau_levenshtein_distance? It looks good to me but I am not sure whether it's the best practice, I remember there are many different implementation methods with different drawbacks when I was working on NLP project.

Thanks.

@wyli wyli enabled auto-merge (squash) July 21, 2021 08:06
@wyli wyli force-pushed the 2630-utility-look-up branch from 2269c0d to 22a60aa Compare July 21, 2021 08:07
@wyli wyli force-pushed the 2630-utility-look-up branch from 22a60aa to 2e9400f Compare July 21, 2021 08:44
@wyli wyli merged commit 0118983 into Project-MONAI:dev Jul 21, 2021
@wyli wyli deleted the 2630-utility-look-up branch July 21, 2021 11:20
@wyli wyli mentioned this pull request Jul 21, 2021
7 tasks
rijobro added a commit that referenced this pull request Jul 22, 2021
* 2630 adds look_up_option (#2631)

* adds look_up_options

Signed-off-by: Wenqi Li <[email protected]>

* adds docstring example

Signed-off-by: Wenqi Li <[email protected]>

* fixes tests

Signed-off-by: Wenqi Li <[email protected]>

* update enum look ups

Signed-off-by: Wenqi Li <[email protected]>

* fixes typos

Signed-off-by: Wenqi Li <[email protected]>

* update based on comments

Signed-off-by: Wenqi Li <[email protected]>

* [DLMED] enhance distance metrics warning (#2638)

Signed-off-by: Nic Ma <[email protected]>

* randweightedcrop (partially done)

Signed-off-by: Richard Brown <[email protected]>

* fixes Pad type hint

Signed-off-by: Wenqi Li <[email protected]>

Co-authored-by: Nic Ma <[email protected]>
Co-authored-by: Richard Brown <[email protected]>
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.

utility function to look up a method against a set of supported methods

2 participants