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

Feat: threshold checker interval string #652

Merged

Conversation

liyier90
Copy link
Contributor

Closes https://github.com/aimakerspace/PeekingDuck-Private/issues/83

Changes:

  • Uses a string to represent the interval of valid values.
  • Checks formatting of the interval string using regex (see details below).

The interval string must match ^[\[\(]\s*[-+]?(inf|\d*\.?\d+)\s*,\s*[-+]?(inf|\d*\.?\d+)\s*[\]\)]$:

  • ^: Start of line
  • [\[\(]: Either [ or (
  • \s*: Any whitespace characters between 0 and unlimited times
  • [-+]?: - or + between 0 and 1 time
  • (inf|\d*\.?\d+): Either inf or a decimal number where having a digit before the period is optional, e.g., .9. Ref comment by Chandranshu
  • \s*: Whitespace
  • ,: Separator
  • \s*: Whitespace
  • [-+]?(inf|\d*\.?\d+): Optional - or + with either inf or a decimal number
  • \s*: Whitespace
  • [\]\)]: Either ] or )
  • $: End of line

Since we are trying to use a mathematical representation of the interval, I have opted to use -inf and +inf for correctness.

@liyier90 liyier90 added the enhancement New feature or request label May 12, 2022
Copy link
Contributor

@ongtw ongtw left a comment

Choose a reason for hiding this comment

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

Some comments for consideration.

peekingduck/pipeline/nodes/base.py Show resolved Hide resolved
peekingduck/pipeline/nodes/base.py Outdated Show resolved Hide resolved
peekingduck/pipeline/nodes/base.py Show resolved Hide resolved
@liyier90 liyier90 requested a review from ongtw May 25, 2022 08:39
Copy link
Contributor

@ongtw ongtw left a comment

Choose a reason for hiding this comment

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

Only one issue outstanding.

@liyier90 liyier90 force-pushed the feat-threshold-checker-interval-string branch from 16b9ffa to 3fa2f48 Compare May 26, 2022 05:57
@liyier90 liyier90 force-pushed the feat-threshold-checker-interval-string branch from 3fa2f48 to 24dbbc9 Compare May 26, 2022 06:02
@liyier90
Copy link
Contributor Author

Set an upper limit to protobuf version. Similar problems have been reported in other projects. issue

@ongtw
Copy link
Contributor

ongtw commented May 26, 2022

Looks good to merge.

@ongtw ongtw merged commit 8cf1be8 into aisingapore:main May 26, 2022
@liyier90 liyier90 deleted the feat-threshold-checker-interval-string branch May 27, 2022 03:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants