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
More Informative N Jobs Print #511
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
95a5070
Updated print
CharlesBradshaw 4813414
Updated n_jobs to check cluster for how many workers got created
CharlesBradshaw fe2b66e
updated print and added warnings
CharlesBradshaw 140e762
added warning call
CharlesBradshaw 5dce80c
Merge branch 'master' into update_n_jobs
CharlesBradshaw 8e4662a
added utils warning test
CharlesBradshaw 45c9057
Merge branch 'update_n_jobs' of https://github.com/Featuretools/featu…
CharlesBradshaw b152445
Added tests
CharlesBradshaw 294b598
increased number of cpus for codecov
CharlesBradshaw e144438
updated to pytest warning
CharlesBradshaw 699ccb9
linted
CharlesBradshaw 0b57c95
Gave more descriptive warning
CharlesBradshaw 02662bf
removed todo
CharlesBradshaw 9a3b5ec
fixed rounding
CharlesBradshaw File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
featuretools/tests/utils_tests/test_computational_backend_utils.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import pytest | ||
|
||
from featuretools.computational_backends.utils import create_client_and_cluster | ||
|
||
|
||
def test_create_client_and_cluster(): | ||
match = r'.*workers requested, but only .* workers created' | ||
with pytest.warns(UserWarning, match=match) as record: | ||
create_client_and_cluster(1000, 2, {}, 1) | ||
assert len(record) == 1 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
instead of rounding up
round
rounds to the nearest integer. To avoid getting zero we could use a function that rounds up or take the min of the rounded number and 1There 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.
What is the motivation for wanting to tell the user it took 1 second if it actually took 0.001 seconds
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.
I thought saying something took 0 seconds would seem strange to the user since clearly it took at least some time to do, but it's probably fine so let's just leave it as is.