-
Notifications
You must be signed in to change notification settings - Fork 181
Add upper bound for prefix_int #823
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
base: main
Are you sure you want to change the base?
Conversation
snarayan21
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just want the error message a bit more cleaned up / clear. Otherwise lgtm
Co-authored-by: Saaketh Narayan <saaketh.narayan@databricks.com>
Co-authored-by: Saaketh Narayan <saaketh.narayan@databricks.com>
snarayan21
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
error comment still slightly confusing imo, approving though
| if prefix_int >= MAX_PREFIX_INT: | ||
| raise ValueError(f'prefix_int exceeds {MAX_PREFIX_INT}. This may happen ' + | ||
| f'when you mock os.path.exists or os.stat functions so the filelock ' + | ||
| f'checks always returns `True` ' + f'you need to clean up TMPDIR.') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this what's intended?
| f'checks always returns `True` ' + f'you need to clean up TMPDIR.') | |
| f'checks always returns `True`. ' + f'You need to clean up TMPDIR.') |
|
@XiaohanZhangCMU some linting errors |
Description of changes:
prefix_int can go up from 0 to infinity. We want to cap it at a large value before it exhausts the compute resources.
Issue #, if available:
Merge Checklist:
Put an
xwithout space in the boxes that apply. If you are unsure about any checklist, please don't hesitate to ask. We are here to help! This is simply a reminder of what we are going to look for before merging your pull request.General
Tests
pre-commiton my change. (check out thepre-commitsection of prerequisites)