-
Notifications
You must be signed in to change notification settings - Fork 79
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
[Feature] Remove and check for prints in codebase using flake8-print #603
Merged
Conversation
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
|
Name | Max | Mean | Ops | Ops on Repo HEAD
|
Change |
---|---|---|---|---|---|
test_plain_set_nested | 39.9650μs | 17.0990μs | 58.4831 KOps/s | 59.0661 KOps/s | |
test_plain_set_stack_nested | 0.2200ms | 0.1434ms | 6.9711 KOps/s | 7.0094 KOps/s | |
test_plain_set_nested_inplace | 52.7880μs | 19.1233μs | 52.2923 KOps/s | 52.5570 KOps/s | |
test_plain_set_stack_nested_inplace | 0.3452ms | 0.1781ms | 5.6133 KOps/s | 5.7143 KOps/s | |
test_items | 46.4170μs | 2.6228μs | 381.2712 KOps/s | 357.7902 KOps/s | |
test_items_nested | 0.8146ms | 0.2674ms | 3.7396 KOps/s | 3.5376 KOps/s | |
test_items_nested_locked | 0.4476ms | 0.2670ms | 3.7457 KOps/s | 3.6119 KOps/s | |
test_items_nested_leaf | 0.4437ms | 0.1668ms | 5.9963 KOps/s | 5.8433 KOps/s | |
test_items_stack_nested | 2.0079ms | 1.5412ms | 648.8258 Ops/s | 648.5791 Ops/s | |
test_items_stack_nested_leaf | 2.1080ms | 1.4031ms | 712.6950 Ops/s | 712.2741 Ops/s | |
test_items_stack_nested_locked | 0.9629ms | 0.7674ms | 1.3030 KOps/s | 1.2777 KOps/s | |
test_keys | 36.5880μs | 3.9206μs | 255.0600 KOps/s | 249.3551 KOps/s | |
test_keys_nested | 50.8503ms | 0.1544ms | 6.4765 KOps/s | 6.7955 KOps/s | |
test_keys_nested_locked | 0.2863ms | 0.1489ms | 6.7164 KOps/s | 6.8594 KOps/s | |
test_keys_nested_leaf | 0.2010ms | 0.1274ms | 7.8467 KOps/s | 7.7883 KOps/s | |
test_keys_stack_nested | 1.5863ms | 1.4902ms | 671.0333 Ops/s | 667.1355 Ops/s | |
test_keys_stack_nested_leaf | 1.5759ms | 1.4775ms | 676.8131 Ops/s | 672.7338 Ops/s | |
test_keys_stack_nested_locked | 0.8067ms | 0.6969ms | 1.4350 KOps/s | 1.4133 KOps/s | |
test_values | 12.2377μs | 1.1657μs | 857.8681 KOps/s | 864.1415 KOps/s | |
test_values_nested | 91.5330μs | 51.0239μs | 19.5987 KOps/s | 19.3570 KOps/s | |
test_values_nested_locked | 90.6790μs | 51.7558μs | 19.3215 KOps/s | 19.2169 KOps/s | |
test_values_nested_leaf | 94.2150μs | 46.1284μs | 21.6786 KOps/s | 21.6201 KOps/s | |
test_values_stack_nested | 1.4512ms | 1.2625ms | 792.1054 Ops/s | 797.3078 Ops/s | |
test_values_stack_nested_leaf | 1.4783ms | 1.2472ms | 801.8150 Ops/s | 806.7335 Ops/s | |
test_values_stack_nested_locked | 0.6175ms | 0.5152ms | 1.9411 KOps/s | 1.9104 KOps/s | |
test_membership | 17.8640μs | 1.3469μs | 742.4561 KOps/s | 744.4504 KOps/s | |
test_membership_nested | 41.9580μs | 2.8937μs | 345.5804 KOps/s | 333.4522 KOps/s | |
test_membership_nested_leaf | 35.8660μs | 2.8766μs | 347.6359 KOps/s | 354.2208 KOps/s | |
test_membership_stacked_nested | 40.0440μs | 11.8929μs | 84.0840 KOps/s | 85.5246 KOps/s | |
test_membership_stacked_nested_leaf | 54.1200μs | 11.9598μs | 83.6133 KOps/s | 84.4994 KOps/s | |
test_membership_nested_last | 44.6030μs | 6.0066μs | 166.4831 KOps/s | 164.6802 KOps/s | |
test_membership_nested_leaf_last | 34.6540μs | 6.0458μs | 165.4040 KOps/s | 166.3128 KOps/s | |
test_membership_stacked_nested_last | 0.2077ms | 0.1665ms | 6.0070 KOps/s | 6.0159 KOps/s | |
test_membership_stacked_nested_leaf_last | 47.9190μs | 13.8906μs | 71.9913 KOps/s | 72.1108 KOps/s | |
test_nested_getleaf | 30.0060μs | 10.6728μs | 93.6965 KOps/s | 94.7639 KOps/s | |
test_nested_get | 47.9800μs | 10.2031μs | 98.0095 KOps/s | 99.7168 KOps/s | |
test_stacked_getleaf | 0.7800ms | 0.6858ms | 1.4582 KOps/s | 1.4769 KOps/s | |
test_stacked_get | 0.7451ms | 0.6441ms | 1.5525 KOps/s | 1.5508 KOps/s | |
test_nested_getitemleaf | 36.8060μs | 10.5167μs | 95.0866 KOps/s | 94.0198 KOps/s | |
test_nested_getitem | 50.1230μs | 9.9794μs | 100.2063 KOps/s | 99.8747 KOps/s | |
test_stacked_getitemleaf | 1.1010ms | 0.6843ms | 1.4614 KOps/s | 1.4744 KOps/s | |
test_stacked_getitem | 1.0209ms | 0.6459ms | 1.5483 KOps/s | 1.5519 KOps/s | |
test_lock_nested | 1.2893ms | 0.4104ms | 2.4366 KOps/s | 2.4307 KOps/s | |
test_lock_stack_nested | 69.9219ms | 6.3261ms | 158.0748 Ops/s | 152.6917 Ops/s | |
test_unlock_nested | 58.0342ms | 0.4733ms | 2.1127 KOps/s | 2.3883 KOps/s | |
test_unlock_stack_nested | 70.1791ms | 6.0443ms | 165.4446 Ops/s | 160.7856 Ops/s | |
test_flatten_speed | 0.5759ms | 0.3645ms | 2.7435 KOps/s | 2.7181 KOps/s | |
test_unflatten_speed | 0.5346ms | 0.4512ms | 2.2161 KOps/s | 2.2094 KOps/s | |
test_common_ops | 1.2194ms | 0.7052ms | 1.4179 KOps/s | 1.3933 KOps/s | |
test_creation | 50.0200μs | 1.9320μs | 517.5860 KOps/s | 517.5841 KOps/s | |
test_creation_empty | 59.6710μs | 10.1755μs | 98.2756 KOps/s | 94.7575 KOps/s | |
test_creation_nested_1 | 40.3550μs | 12.9022μs | 77.5062 KOps/s | 74.9200 KOps/s | |
test_creation_nested_2 | 55.7340μs | 18.4183μs | 54.2938 KOps/s | 53.0588 KOps/s | |
test_clone | 80.4000μs | 12.2794μs | 81.4372 KOps/s | 81.4219 KOps/s | |
test_getitem[int] | 33.0720μs | 11.8707μs | 84.2410 KOps/s | 85.6570 KOps/s | |
test_getitem[slice_int] | 84.5170μs | 23.1325μs | 43.2293 KOps/s | 42.5858 KOps/s | |
test_getitem[range] | 89.8670μs | 43.2377μs | 23.1279 KOps/s | 23.1960 KOps/s | |
test_getitem[tuple] | 48.4410μs | 18.7365μs | 53.3717 KOps/s | 52.6875 KOps/s | |
test_getitem[list] | 0.1164ms | 38.5495μs | 25.9407 KOps/s | 26.2765 KOps/s | |
test_setitem_dim[int] | 51.5050μs | 31.6134μs | 31.6321 KOps/s | 30.4970 KOps/s | |
test_setitem_dim[slice_int] | 83.3650μs | 57.5593μs | 17.3734 KOps/s | 17.2381 KOps/s | |
test_setitem_dim[range] | 0.1018ms | 74.1203μs | 13.4916 KOps/s | 13.0480 KOps/s | |
test_setitem_dim[tuple] | 90.4480μs | 45.6522μs | 21.9047 KOps/s | 21.4245 KOps/s | |
test_setitem | 0.1087ms | 18.9307μs | 52.8241 KOps/s | 51.8255 KOps/s | |
test_set | 98.0330μs | 18.1067μs | 55.2283 KOps/s | 53.5620 KOps/s | |
test_set_shared | 2.1180ms | 0.1359ms | 7.3595 KOps/s | 7.1635 KOps/s | |
test_update | 0.1591ms | 21.2006μs | 47.1684 KOps/s | 45.6413 KOps/s | |
test_update_nested | 93.6840μs | 28.7028μs | 34.8398 KOps/s | 34.1469 KOps/s | |
test_set_nested | 74.1280μs | 20.0550μs | 49.8629 KOps/s | 49.1737 KOps/s | |
test_set_nested_new | 0.1241ms | 24.2036μs | 41.3162 KOps/s | 40.2969 KOps/s | |
test_select | 0.1188ms | 48.3770μs | 20.6710 KOps/s | 20.0337 KOps/s | |
test_unbind_speed | 0.4265ms | 0.3379ms | 2.9591 KOps/s | 2.9416 KOps/s | |
test_unbind_speed_stack0 | 69.2949ms | 4.3748ms | 228.5833 Ops/s | 234.8520 Ops/s | |
test_unbind_speed_stack1 | 2.6660μs | 0.6345μs | 1.5760 MOps/s | 1.6182 MOps/s | |
test_split | 62.2639ms | 1.6783ms | 595.8567 Ops/s | 595.5881 Ops/s | |
test_chunk | 60.8499ms | 1.6374ms | 610.7280 Ops/s | 604.7895 Ops/s | |
test_creation[device0] | 3.5669ms | 0.2959ms | 3.3792 KOps/s | 3.4009 KOps/s | |
test_creation_from_tensor | 0.6487ms | 0.3284ms | 3.0453 KOps/s | 3.0374 KOps/s | |
test_add_one[memmap_tensor0] | 93.4940μs | 25.5579μs | 39.1269 KOps/s | 38.8768 KOps/s | |
test_contiguous[memmap_tensor0] | 17.9540μs | 5.7566μs | 173.7133 KOps/s | 175.8955 KOps/s | |
test_stack[memmap_tensor0] | 65.1010μs | 19.0797μs | 52.4116 KOps/s | 52.2811 KOps/s | |
test_memmaptd_index | 0.4265ms | 0.1965ms | 5.0901 KOps/s | 4.9609 KOps/s | |
test_memmaptd_index_astensor | 0.3621ms | 0.2527ms | 3.9570 KOps/s | 3.8151 KOps/s | |
test_memmaptd_index_op | 0.6334ms | 0.5322ms | 1.8791 KOps/s | 1.7575 KOps/s | |
test_serialize_model | 0.1653s | 0.1064s | 9.3950 Ops/s | 9.2031 Ops/s | |
test_serialize_model_filesystem | 0.1560s | 96.3057ms | 10.3836 Ops/s | 9.9692 Ops/s | |
test_serialize_model_pickle | 0.4459s | 0.3738s | 2.6755 Ops/s | 2.5789 Ops/s | |
test_serialize_weights | 0.1636s | 0.1036s | 9.6568 Ops/s | 9.5792 Ops/s | |
test_serialize_weights_filesystem | 94.6880ms | 89.6602ms | 11.1532 Ops/s | 10.8432 Ops/s | |
test_serialize_weights_returnearly | 0.1830s | 0.1316s | 7.6013 Ops/s | 7.7115 Ops/s | |
test_serialize_weights_pickle | 1.1048s | 0.6528s | 1.5318 Ops/s | 2.0549 Ops/s | |
test_reshape_pytree | 64.7200μs | 22.9259μs | 43.6188 KOps/s | 42.8467 KOps/s | |
test_reshape_td | 68.1270μs | 29.9806μs | 33.3549 KOps/s | 34.0656 KOps/s | |
test_view_pytree | 59.0800μs | 22.4677μs | 44.5083 KOps/s | 42.9349 KOps/s | |
test_view_td | 24.3150μs | 4.8746μs | 205.1470 KOps/s | 206.7116 KOps/s | |
test_unbind_pytree | 59.1700μs | 25.8833μs | 38.6349 KOps/s | 37.4825 KOps/s | |
test_unbind_td | 0.1102ms | 54.4951μs | 18.3503 KOps/s | 18.6081 KOps/s | |
test_split_pytree | 61.3440μs | 25.6233μs | 39.0270 KOps/s | 38.4011 KOps/s | |
test_split_td | 0.5232ms | 43.1299μs | 23.1858 KOps/s | 23.4836 KOps/s | |
test_add_pytree | 75.0200μs | 31.9512μs | 31.2977 KOps/s | 30.5390 KOps/s | |
test_add_td | 0.1382ms | 47.8298μs | 20.9075 KOps/s | 19.9732 KOps/s | |
test_distributed | 49.0310μs | 6.0255μs | 165.9626 KOps/s | 164.4734 KOps/s | |
test_tdmodule | 0.3317ms | 21.8226μs | 45.8240 KOps/s | 42.9256 KOps/s | |
test_tdmodule_dispatch | 0.1764ms | 40.7361μs | 24.5483 KOps/s | 23.3183 KOps/s | |
test_tdseq | 52.2880μs | 24.9408μs | 40.0949 KOps/s | 37.4274 KOps/s | |
test_tdseq_dispatch | 0.3834ms | 44.9675μs | 22.2383 KOps/s | 21.6092 KOps/s | |
test_instantiation_functorch | 2.0610ms | 1.3000ms | 769.2169 Ops/s | 779.4725 Ops/s | |
test_instantiation_td | 1.7028ms | 1.0022ms | 997.7782 Ops/s | 1.0069 KOps/s | |
test_exec_functorch | 0.2492ms | 0.1592ms | 6.2811 KOps/s | 6.2170 KOps/s | |
test_exec_functional_call | 0.3534ms | 0.1469ms | 6.8063 KOps/s | 6.7298 KOps/s | |
test_exec_td | 0.2151ms | 0.1428ms | 7.0004 KOps/s | 6.9230 KOps/s | |
test_exec_td_decorator | 0.7581ms | 0.1739ms | 5.7521 KOps/s | 5.6632 KOps/s | |
test_vmap_mlp_speed[True-True] | 1.2930ms | 0.9092ms | 1.0999 KOps/s | 1.0769 KOps/s | |
test_vmap_mlp_speed[True-False] | 0.8592ms | 0.4729ms | 2.1145 KOps/s | 2.1262 KOps/s | |
test_vmap_mlp_speed[False-True] | 1.4461ms | 0.7901ms | 1.2657 KOps/s | 1.2498 KOps/s | |
test_vmap_mlp_speed[False-False] | 0.5921ms | 0.3856ms | 2.5935 KOps/s | 2.5988 KOps/s | |
test_vmap_mlp_speed_decorator[True-True] | 2.4105ms | 1.8202ms | 549.3791 Ops/s | 534.5572 Ops/s | |
test_vmap_mlp_speed_decorator[True-False] | 0.8614ms | 0.5164ms | 1.9365 KOps/s | 1.9109 KOps/s | |
test_vmap_mlp_speed_decorator[False-True] | 1.8405ms | 1.5177ms | 658.8843 Ops/s | 641.7770 Ops/s | |
test_vmap_mlp_speed_decorator[False-False] | 0.7356ms | 0.3972ms | 2.5174 KOps/s | 2.5275 KOps/s |
@@ -216,7 +217,7 @@ def print_trouble(prog, message, use_colors): | |||
error_text = "error:" | |||
if use_colors: | |||
error_text = bold_red(error_text) | |||
print(f"{prog}: {error_text} {message}", file=sys.stderr) | |||
logging.info(f"{prog}: {error_text} {message}", file=sys.stderr) |
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.
nit: if this is logged to the stderr, maybe we should log it as error i.e. logging.error
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
CLA Signed
This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Formatting
Code formatting
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.
No description provided.