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

[Minor] Better errors for kwargs and key selection #415

Merged
merged 1 commit into from
Jun 12, 2023

Conversation

vmoens
Copy link
Contributor

@vmoens vmoens commented Jun 12, 2023

No description provided.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jun 12, 2023
@vmoens vmoens merged commit 237e389 into main Jun 12, 2023
@vmoens vmoens deleted the better_error_for_kwargs branch June 12, 2023 16:08
@github-actions
Copy link

$\color{#D29922}\textsf{\Large⚠\kern{0.2cm}\normalsize Warning}$ Result of GPU Benchmark Tests

Total Benchmarks: 47. Improved: $\large\color{#35bf28}2$. Worsened: $\large\color{#d91a1a}6$.

Expand to view detailed results
Name Max Mean Ops Ops on Repo HEAD Change
test_common_ops 1.3395ms 1.0990ms 909.9150 Ops/s 950.4322 Ops/s $\color{#d91a1a}-4.26\%$
test_creation 15.8397μs 4.9102μs 203.6584 KOps/s 269.1241 KOps/s $\textbf{\color{#d91a1a}-24.33\%}$
test_creation_empty 29.2773μs 11.7160μs 85.3532 KOps/s 98.3258 KOps/s $\textbf{\color{#d91a1a}-13.19\%}$
test_creation_nested_1 53.6193μs 23.1861μs 43.1293 KOps/s 52.7408 KOps/s $\textbf{\color{#d91a1a}-18.22\%}$
test_creation_nested_2 49.3021μs 22.7388μs 43.9777 KOps/s 49.5849 KOps/s $\textbf{\color{#d91a1a}-11.31\%}$
test_clone 53.1703μs 27.4723μs 36.4003 KOps/s 41.1343 KOps/s $\textbf{\color{#d91a1a}-11.51\%}$
test_getitem[int] 34.3825μs 29.6961μs 33.6744 KOps/s 33.3094 KOps/s $\color{#35bf28}+1.10\%$
test_getitem[slice_int] 67.0090μs 63.2096μs 15.8204 KOps/s 15.9108 KOps/s $\color{#d91a1a}-0.57\%$
test_getitem[range] 74.5567μs 68.8146μs 14.5318 KOps/s 15.1221 KOps/s $\color{#d91a1a}-3.90\%$
test_getitem[tuple] 64.9562μs 59.1603μs 16.9032 KOps/s 17.2011 KOps/s $\color{#d91a1a}-1.73\%$
test_getitem[list] 64.7872μs 59.6905μs 16.7531 KOps/s 16.6271 KOps/s $\color{#35bf28}+0.76\%$
test_setitem_dim[int] 95.1010μs 46.2331μs 21.6295 KOps/s 22.2471 KOps/s $\color{#d91a1a}-2.78\%$
test_setitem_dim[slice_int] 0.1442ms 83.4505μs 11.9831 KOps/s 12.1897 KOps/s $\color{#d91a1a}-1.69\%$
test_setitem_dim[range] 0.1778ms 81.5292μs 12.2655 KOps/s 12.4766 KOps/s $\color{#d91a1a}-1.69\%$
test_setitem_dim[tuple] 0.1385ms 74.5956μs 13.4056 KOps/s 13.6224 KOps/s $\color{#d91a1a}-1.59\%$
test_setitem 32.7225μs 30.5414μs 32.7424 KOps/s 33.9312 KOps/s $\color{#d91a1a}-3.50\%$
test_set 32.6825μs 29.6165μs 33.7649 KOps/s 33.7240 KOps/s $\color{#35bf28}+0.12\%$
test_set_shared 0.1840ms 0.1766ms 5.6629 KOps/s 5.6876 KOps/s $\color{#d91a1a}-0.43\%$
test_update 34.8925μs 32.3471μs 30.9147 KOps/s 31.2800 KOps/s $\color{#d91a1a}-1.17\%$
test_update_nested 50.0527μs 47.8462μs 20.9003 KOps/s 21.1702 KOps/s $\color{#d91a1a}-1.28\%$
test_set_nested 41.4126μs 39.2004μs 25.5100 KOps/s 25.6398 KOps/s $\color{#d91a1a}-0.51\%$
test_set_nested_new 56.4268μs 54.1094μs 18.4811 KOps/s 18.5145 KOps/s $\color{#d91a1a}-0.18\%$
test_select 98.6764μs 88.2036μs 11.3374 KOps/s 11.2290 KOps/s $\color{#35bf28}+0.97\%$
test_creation[device0] 1.3692ms 0.5811ms 1.7207 KOps/s 1.5331 KOps/s $\textbf{\color{#35bf28}+12.24\%}$
test_creation_from_tensor 0.6877ms 0.5614ms 1.7813 KOps/s 1.7448 KOps/s $\color{#35bf28}+2.10\%$
test_add_one[memmap_tensor0] 36.1305μs 32.7416μs 30.5422 KOps/s 29.2402 KOps/s $\color{#35bf28}+4.45\%$
test_contiguous[memmap_tensor0] 9.6521μs 9.0058μs 111.0396 KOps/s 109.6314 KOps/s $\color{#35bf28}+1.28\%$
test_stack[memmap_tensor0] 0.2516ms 55.3909μs 18.0535 KOps/s 18.8145 KOps/s $\color{#d91a1a}-4.04\%$
test_reshape_pytree 36.7495μs 33.4461μs 29.8989 KOps/s 30.2674 KOps/s $\color{#d91a1a}-1.22\%$
test_reshape_td 47.8887μs 46.6739μs 21.4252 KOps/s 21.5472 KOps/s $\color{#d91a1a}-0.57\%$
test_view_pytree 31.9355μs 30.5762μs 32.7052 KOps/s 33.0569 KOps/s $\color{#d91a1a}-1.06\%$
test_view_td 9.1461μs 8.0831μs 123.7153 KOps/s 123.1088 KOps/s $\color{#35bf28}+0.49\%$
test_unbind_pytree 37.2946μs 35.8758μs 27.8739 KOps/s 28.7311 KOps/s $\color{#d91a1a}-2.98\%$
test_unbind_td 0.1458ms 0.1400ms 7.1419 KOps/s 7.1249 KOps/s $\color{#35bf28}+0.24\%$
test_split_pytree 41.7055μs 38.4492μs 26.0083 KOps/s 25.4779 KOps/s $\color{#35bf28}+2.08\%$
test_split_td 0.1129ms 0.1096ms 9.1221 KOps/s 9.0637 KOps/s $\color{#35bf28}+0.64\%$
test_add_pytree 45.8585μs 43.5554μs 22.9592 KOps/s 24.1309 KOps/s $\color{#d91a1a}-4.86\%$
test_add_td 62.6337μs 59.2441μs 16.8793 KOps/s 16.9724 KOps/s $\color{#d91a1a}-0.55\%$
test_distributed 74.1010μs 74.1010μs 13.4951 KOps/s 10.0805 KOps/s $\textbf{\color{#35bf28}+33.87\%}$
test_tdmodule 0.1448ms 26.0386μs 38.4045 KOps/s 40.2131 KOps/s $\color{#d91a1a}-4.50\%$
test_tdmodule_dispatch 0.2604ms 55.9947μs 17.8588 KOps/s 18.1761 KOps/s $\color{#d91a1a}-1.75\%$
test_tdseq 0.1043ms 35.2387μs 28.3779 KOps/s 28.5098 KOps/s $\color{#d91a1a}-0.46\%$
test_tdseq_dispatch 0.1289ms 65.7914μs 15.1996 KOps/s 15.0998 KOps/s $\color{#35bf28}+0.66\%$
test_instantiation_functorch 1.6082ms 1.4989ms 667.1651 Ops/s 675.5692 Ops/s $\color{#d91a1a}-1.24\%$
test_instantiation_td 1.9226ms 1.2428ms 804.6252 Ops/s 869.7826 Ops/s $\textbf{\color{#d91a1a}-7.49\%}$
test_exec_functorch 0.2419ms 0.1884ms 5.3068 KOps/s 5.3874 KOps/s $\color{#d91a1a}-1.50\%$
test_exec_td 0.3106ms 0.2976ms 3.3602 KOps/s 3.2941 KOps/s $\color{#35bf28}+2.00\%$

@github-actions
Copy link

$\color{#D29922}\textsf{\Large⚠\kern{0.2cm}\normalsize Warning}$ Result of CPU Benchmark Tests

Total Benchmarks: 47. Improved: $\large\color{#35bf28}2$. Worsened: $\large\color{#d91a1a}22$.

Expand to view detailed results
Name Max Mean Ops Ops on Repo HEAD Change
test_common_ops 2.0899ms 1.7538ms 570.1943 Ops/s 579.8493 Ops/s $\color{#d91a1a}-1.67\%$
test_creation 11.0772μs 5.5179μs 181.2278 KOps/s 191.8267 KOps/s $\textbf{\color{#d91a1a}-5.53\%}$
test_creation_empty 70.6280μs 15.8606μs 63.0492 KOps/s 68.5400 KOps/s $\textbf{\color{#d91a1a}-8.01\%}$
test_creation_nested_1 47.3797μs 29.7653μs 33.5962 KOps/s 36.4032 KOps/s $\textbf{\color{#d91a1a}-7.71\%}$
test_creation_nested_2 71.5410μs 31.6344μs 31.6112 KOps/s 35.0193 KOps/s $\textbf{\color{#d91a1a}-9.73\%}$
test_clone 56.9305μs 40.8639μs 24.4715 KOps/s 24.4943 KOps/s $\color{#d91a1a}-0.09\%$
test_getitem[int] 67.2303μs 49.3044μs 20.2822 KOps/s 20.6609 KOps/s $\color{#d91a1a}-1.83\%$
test_getitem[slice_int] 0.1332ms 0.1088ms 9.1902 KOps/s 8.8726 KOps/s $\color{#35bf28}+3.58\%$
test_getitem[range] 0.2189ms 0.1276ms 7.8368 KOps/s 8.1540 KOps/s $\color{#d91a1a}-3.89\%$
test_getitem[tuple] 0.1135ms 95.5063μs 10.4705 KOps/s 9.0214 KOps/s $\textbf{\color{#35bf28}+16.06\%}$
test_getitem[list] 0.1624ms 0.1116ms 8.9586 KOps/s 9.4402 KOps/s $\textbf{\color{#d91a1a}-5.10\%}$
test_setitem_dim[int] 5.7767ms 80.9272μs 12.3568 KOps/s 12.6561 KOps/s $\color{#d91a1a}-2.37\%$
test_setitem_dim[slice_int] 2.8331ms 0.1502ms 6.6594 KOps/s 6.9186 KOps/s $\color{#d91a1a}-3.75\%$
test_setitem_dim[range] 2.7205ms 0.1478ms 6.7649 KOps/s 7.2006 KOps/s $\textbf{\color{#d91a1a}-6.05\%}$
test_setitem_dim[tuple] 4.6468ms 0.1299ms 7.6953 KOps/s 7.7733 KOps/s $\color{#d91a1a}-1.00\%$
test_setitem 0.1167ms 54.7840μs 18.2535 KOps/s 18.2028 KOps/s $\color{#35bf28}+0.28\%$
test_set 98.5318μs 54.9264μs 18.2062 KOps/s 18.0694 KOps/s $\color{#35bf28}+0.76\%$
test_set_shared 0.3576ms 0.2979ms 3.3566 KOps/s 3.3701 KOps/s $\color{#d91a1a}-0.40\%$
test_update 75.7377μs 54.7617μs 18.2609 KOps/s 17.9944 KOps/s $\color{#35bf28}+1.48\%$
test_update_nested 0.1758ms 85.6798μs 11.6714 KOps/s 12.5277 KOps/s $\textbf{\color{#d91a1a}-6.84\%}$
test_set_nested 0.1364ms 72.7233μs 13.7508 KOps/s 13.7082 KOps/s $\color{#35bf28}+0.31\%$
test_set_nested_new 0.1461ms 97.5464μs 10.2515 KOps/s 10.4784 KOps/s $\color{#d91a1a}-2.16\%$
test_select 0.2068ms 0.1539ms 6.4970 KOps/s 6.7676 KOps/s $\color{#d91a1a}-4.00\%$
test_creation[device0] 1.6154ms 0.6320ms 1.5822 KOps/s 1.5655 KOps/s $\color{#35bf28}+1.07\%$
test_creation_from_tensor 0.7151ms 0.6010ms 1.6639 KOps/s 1.5320 KOps/s $\textbf{\color{#35bf28}+8.61\%}$
test_add_one[memmap_tensor0] 0.1326ms 63.0154μs 15.8691 KOps/s 15.1893 KOps/s $\color{#35bf28}+4.48\%$
test_contiguous[memmap_tensor0] 28.8593μs 13.0955μs 76.3621 KOps/s 82.7367 KOps/s $\textbf{\color{#d91a1a}-7.70\%}$
test_stack[memmap_tensor0] 0.2423ms 75.0108μs 13.3314 KOps/s 14.1541 KOps/s $\textbf{\color{#d91a1a}-5.81\%}$
test_reshape_pytree 0.1032ms 49.3075μs 20.2809 KOps/s 19.3239 KOps/s $\color{#35bf28}+4.95\%$
test_reshape_td 0.1248ms 77.9437μs 12.8298 KOps/s 12.8869 KOps/s $\color{#d91a1a}-0.44\%$
test_view_pytree 0.1099ms 46.9642μs 21.2928 KOps/s 21.2033 KOps/s $\color{#35bf28}+0.42\%$
test_view_td 28.4523μs 12.2590μs 81.5726 KOps/s 86.9480 KOps/s $\textbf{\color{#d91a1a}-6.18\%}$
test_unbind_pytree 96.6529μs 51.6014μs 19.3793 KOps/s 20.4832 KOps/s $\textbf{\color{#d91a1a}-5.39\%}$
test_unbind_td 0.3686ms 0.2471ms 4.0462 KOps/s 4.3208 KOps/s $\textbf{\color{#d91a1a}-6.35\%}$
test_split_pytree 92.4216μs 60.5259μs 16.5219 KOps/s 16.8444 KOps/s $\color{#d91a1a}-1.91\%$
test_split_td 0.2536ms 0.1843ms 5.4253 KOps/s 5.4960 KOps/s $\color{#d91a1a}-1.29\%$
test_add_pytree 0.1231ms 72.7681μs 13.7423 KOps/s 14.5817 KOps/s $\textbf{\color{#d91a1a}-5.76\%}$
test_add_td 0.2087ms 0.1207ms 8.2879 KOps/s 8.5289 KOps/s $\color{#d91a1a}-2.82\%$
test_distributed 96.6000μs 96.6000μs 10.3520 KOps/s 10.9527 KOps/s $\textbf{\color{#d91a1a}-5.48\%}$
test_tdmodule 4.6187ms 45.4481μs 22.0031 KOps/s 24.9116 KOps/s $\textbf{\color{#d91a1a}-11.68\%}$
test_tdmodule_dispatch 68.4219ms 99.7540μs 10.0247 KOps/s 11.3611 KOps/s $\textbf{\color{#d91a1a}-11.76\%}$
test_tdseq 4.2291ms 59.6778μs 16.7567 KOps/s 18.9135 KOps/s $\textbf{\color{#d91a1a}-11.40\%}$
test_tdseq_dispatch 2.1061ms 0.1059ms 9.4427 KOps/s 10.2005 KOps/s $\textbf{\color{#d91a1a}-7.43\%}$
test_instantiation_functorch 3.4375ms 2.3677ms 422.3487 Ops/s 466.8743 Ops/s $\textbf{\color{#d91a1a}-9.54\%}$
test_instantiation_td 9.5915ms 1.9049ms 524.9583 Ops/s 617.2378 Ops/s $\textbf{\color{#d91a1a}-14.95\%}$
test_exec_functorch 0.3892ms 0.3064ms 3.2641 KOps/s 3.5406 KOps/s $\textbf{\color{#d91a1a}-7.81\%}$
test_exec_td 0.6395ms 0.5258ms 1.9020 KOps/s 2.0478 KOps/s $\textbf{\color{#d91a1a}-7.12\%}$

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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants