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

[Refactor] Fix imports #1551

Merged
merged 2 commits into from
Sep 20, 2023
Merged

[Refactor] Fix imports #1551

merged 2 commits into from
Sep 20, 2023

Conversation

vmoens
Copy link
Contributor

@vmoens vmoens commented Sep 20, 2023

Description

  • Fixes robohive import that occured at root level
  • Fixes the mujoco device annoying print

@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 Sep 20, 2023
@vmoens vmoens linked an issue Sep 20, 2023 that may be closed by this pull request
@vmoens vmoens added the Refactoring Refactoring of an existing feature label Sep 20, 2023
@github-actions
Copy link

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

Total Benchmarks: 89. Improved: $\large\color{#35bf28}18$. Worsened: $\large\color{#d91a1a}13$.

Expand to view detailed results
Name Max Mean Ops Ops on Repo HEAD Change
test_single 79.5516ms 79.0859ms 12.6445 Ops/s 12.3510 Ops/s $\color{#35bf28}+2.38\%$
test_sync 0.1483s 50.8884ms 19.6508 Ops/s 21.0708 Ops/s $\textbf{\color{#d91a1a}-6.74\%}$
test_async 72.6391ms 43.2171ms 23.1390 Ops/s 23.6028 Ops/s $\color{#d91a1a}-1.96\%$
test_simple 0.7630s 0.6688s 1.4952 Ops/s 1.5520 Ops/s $\color{#d91a1a}-3.66\%$
test_transformed 0.9516s 0.8669s 1.1536 Ops/s 1.1548 Ops/s $\color{#d91a1a}-0.11\%$
test_serial 1.9559s 1.8709s 0.5345 Ops/s 0.5339 Ops/s $\color{#35bf28}+0.11\%$
test_parallel 1.7393s 1.6296s 0.6136 Ops/s 0.6394 Ops/s $\color{#d91a1a}-4.03\%$
test_step_mdp_speed[True-True-True-True-True] 0.2032ms 45.1526μs 22.1471 KOps/s 22.6903 KOps/s $\color{#d91a1a}-2.39\%$
test_step_mdp_speed[True-True-True-True-False] 0.1099ms 25.7042μs 38.9041 KOps/s 40.6956 KOps/s $\color{#d91a1a}-4.40\%$
test_step_mdp_speed[True-True-True-False-True] 0.1688ms 32.3845μs 30.8789 KOps/s 31.9029 KOps/s $\color{#d91a1a}-3.21\%$
test_step_mdp_speed[True-True-True-False-False] 58.1010μs 17.6534μs 56.6464 KOps/s 57.5086 KOps/s $\color{#d91a1a}-1.50\%$
test_step_mdp_speed[True-True-False-True-True] 0.1623ms 47.0349μs 21.2608 KOps/s 21.7819 KOps/s $\color{#d91a1a}-2.39\%$
test_step_mdp_speed[True-True-False-True-False] 65.1010μs 27.3782μs 36.5254 KOps/s 37.6467 KOps/s $\color{#d91a1a}-2.98\%$
test_step_mdp_speed[True-True-False-False-True] 0.1505ms 34.2266μs 29.2171 KOps/s 30.0336 KOps/s $\color{#d91a1a}-2.72\%$
test_step_mdp_speed[True-True-False-False-False] 57.2010μs 19.4683μs 51.3656 KOps/s 52.1075 KOps/s $\color{#d91a1a}-1.42\%$
test_step_mdp_speed[True-False-True-True-True] 81.1020μs 48.5463μs 20.5989 KOps/s 20.9651 KOps/s $\color{#d91a1a}-1.75\%$
test_step_mdp_speed[True-False-True-True-False] 64.7010μs 29.2806μs 34.1523 KOps/s 35.4708 KOps/s $\color{#d91a1a}-3.72\%$
test_step_mdp_speed[True-False-True-False-True] 0.1182ms 33.7252μs 29.6514 KOps/s 29.3781 KOps/s $\color{#35bf28}+0.93\%$
test_step_mdp_speed[True-False-True-False-False] 40.2010μs 19.3903μs 51.5721 KOps/s 52.1730 KOps/s $\color{#d91a1a}-1.15\%$
test_step_mdp_speed[True-False-False-True-True] 0.1134ms 50.1591μs 19.9366 KOps/s 20.3600 KOps/s $\color{#d91a1a}-2.08\%$
test_step_mdp_speed[True-False-False-True-False] 0.1283ms 31.1158μs 32.1380 KOps/s 33.5290 KOps/s $\color{#d91a1a}-4.15\%$
test_step_mdp_speed[True-False-False-False-True] 75.6010μs 35.3696μs 28.2729 KOps/s 29.0184 KOps/s $\color{#d91a1a}-2.57\%$
test_step_mdp_speed[True-False-False-False-False] 1.1693ms 21.4663μs 46.5847 KOps/s 48.4065 KOps/s $\color{#d91a1a}-3.76\%$
test_step_mdp_speed[False-True-True-True-True] 0.2122ms 48.7075μs 20.5307 KOps/s 21.1070 KOps/s $\color{#d91a1a}-2.73\%$
test_step_mdp_speed[False-True-True-True-False] 0.1228ms 29.5324μs 33.8611 KOps/s 35.1736 KOps/s $\color{#d91a1a}-3.73\%$
test_step_mdp_speed[False-True-True-False-True] 82.2010μs 37.8105μs 26.4477 KOps/s 27.2889 KOps/s $\color{#d91a1a}-3.08\%$
test_step_mdp_speed[False-True-True-False-False] 4.9487ms 22.1389μs 45.1694 KOps/s 45.9915 KOps/s $\color{#d91a1a}-1.79\%$
test_step_mdp_speed[False-True-False-True-True] 0.1827ms 50.0532μs 19.9787 KOps/s 20.3256 KOps/s $\color{#d91a1a}-1.71\%$
test_step_mdp_speed[False-True-False-True-False] 0.1183ms 30.8910μs 32.3718 KOps/s 32.3847 KOps/s $\color{#d91a1a}-0.04\%$
test_step_mdp_speed[False-True-False-False-True] 72.5010μs 39.1361μs 25.5518 KOps/s 26.2787 KOps/s $\color{#d91a1a}-2.77\%$
test_step_mdp_speed[False-True-False-False-False] 0.4971ms 23.4237μs 42.6918 KOps/s 43.2673 KOps/s $\color{#d91a1a}-1.33\%$
test_step_mdp_speed[False-False-True-True-True] 0.1688ms 53.0082μs 18.8650 KOps/s 19.6021 KOps/s $\color{#d91a1a}-3.76\%$
test_step_mdp_speed[False-False-True-True-False] 83.8010μs 33.0232μs 30.2817 KOps/s 31.6716 KOps/s $\color{#d91a1a}-4.39\%$
test_step_mdp_speed[False-False-True-False-True] 0.1406ms 39.5489μs 25.2851 KOps/s 25.9389 KOps/s $\color{#d91a1a}-2.52\%$
test_step_mdp_speed[False-False-True-False-False] 58.4010μs 23.3722μs 42.7859 KOps/s 44.1191 KOps/s $\color{#d91a1a}-3.02\%$
test_step_mdp_speed[False-False-False-True-True] 0.1744ms 54.0251μs 18.5099 KOps/s 19.1308 KOps/s $\color{#d91a1a}-3.25\%$
test_step_mdp_speed[False-False-False-True-False] 0.2326ms 34.3533μs 29.1093 KOps/s 30.0778 KOps/s $\color{#d91a1a}-3.22\%$
test_step_mdp_speed[False-False-False-False-True] 96.8010μs 40.9243μs 24.4354 KOps/s 24.9000 KOps/s $\color{#d91a1a}-1.87\%$
test_step_mdp_speed[False-False-False-False-False] 0.1142ms 24.9689μs 40.0498 KOps/s 41.2033 KOps/s $\color{#d91a1a}-2.80\%$
test_values[generalized_advantage_estimate-True-True] 15.9104ms 14.5931ms 68.5258 Ops/s 60.8138 Ops/s $\textbf{\color{#35bf28}+12.68\%}$
test_values[vec_generalized_advantage_estimate-True-True] 93.4854ms 48.0405ms 20.8158 Ops/s 22.2039 Ops/s $\textbf{\color{#d91a1a}-6.25\%}$
test_values[td0_return_estimate-False-False] 0.4476ms 0.3310ms 3.0214 KOps/s 4.2593 KOps/s $\textbf{\color{#d91a1a}-29.06\%}$
test_values[td1_return_estimate-False-False] 15.1021ms 13.9821ms 71.5203 Ops/s 72.7300 Ops/s $\color{#d91a1a}-1.66\%$
test_values[vec_td1_return_estimate-False-False] 53.1952ms 45.0868ms 22.1795 Ops/s 20.9130 Ops/s $\textbf{\color{#35bf28}+6.06\%}$
test_values[td_lambda_return_estimate-True-False] 34.6905ms 32.8056ms 30.4826 Ops/s 30.5512 Ops/s $\color{#d91a1a}-0.22\%$
test_values[vec_td_lambda_return_estimate-True-False] 0.1207s 49.1234ms 20.3569 Ops/s 22.2941 Ops/s $\textbf{\color{#d91a1a}-8.69\%}$
test_gae_speed[generalized_advantage_estimate-False-1-512] 12.0967ms 11.9261ms 83.8496 Ops/s 84.8050 Ops/s $\color{#d91a1a}-1.13\%$
test_gae_speed[vec_generalized_advantage_estimate-True-1-512] 6.5949ms 3.5712ms 280.0190 Ops/s 261.6243 Ops/s $\textbf{\color{#35bf28}+7.03\%}$
test_gae_speed[vec_generalized_advantage_estimate-False-1-512] 6.7299ms 0.5813ms 1.7203 KOps/s 1.5865 KOps/s $\textbf{\color{#35bf28}+8.44\%}$
test_gae_speed[vec_generalized_advantage_estimate-True-32-512] 61.7220ms 51.7571ms 19.3210 Ops/s 16.5915 Ops/s $\textbf{\color{#35bf28}+16.45\%}$
test_gae_speed[vec_generalized_advantage_estimate-False-32-512] 36.2890ms 3.7283ms 268.2222 Ops/s 323.4771 Ops/s $\textbf{\color{#d91a1a}-17.08\%}$
test_dqn_speed 44.4578ms 2.2041ms 453.6947 Ops/s 507.6439 Ops/s $\textbf{\color{#d91a1a}-10.63\%}$
test_ddpg_speed 11.8185ms 3.0760ms 325.0951 Ops/s 323.0535 Ops/s $\color{#35bf28}+0.63\%$
test_sac_speed 17.1506ms 10.1220ms 98.7945 Ops/s 107.2033 Ops/s $\textbf{\color{#d91a1a}-7.84\%}$
test_redq_speed 27.2338ms 19.7105ms 50.7343 Ops/s 53.2487 Ops/s $\color{#d91a1a}-4.72\%$
test_redq_deprec_speed 24.0947ms 16.0477ms 62.3144 Ops/s 55.7964 Ops/s $\textbf{\color{#35bf28}+11.68\%}$
test_td3_speed 26.6453ms 12.8127ms 78.0476 Ops/s 82.0047 Ops/s $\color{#d91a1a}-4.83\%$
test_cql_speed 84.5770ms 39.3640ms 25.4039 Ops/s 31.2638 Ops/s $\textbf{\color{#d91a1a}-18.74\%}$
test_a2c_speed 15.0915ms 7.0989ms 140.8668 Ops/s 130.4417 Ops/s $\textbf{\color{#35bf28}+7.99\%}$
test_ppo_speed 19.1739ms 7.5533ms 132.3922 Ops/s 129.7405 Ops/s $\color{#35bf28}+2.04\%$
test_reinforce_speed 14.5040ms 5.0909ms 196.4283 Ops/s 186.6279 Ops/s $\textbf{\color{#35bf28}+5.25\%}$
test_iql_speed 33.2728ms 25.4885ms 39.2333 Ops/s 33.2180 Ops/s $\textbf{\color{#35bf28}+18.11\%}$
test_sample_rb[TensorDictReplayBuffer-ListStorage-RandomSampler-4000] 4.2523ms 2.8874ms 346.3344 Ops/s 339.5693 Ops/s $\color{#35bf28}+1.99\%$
test_sample_rb[TensorDictReplayBuffer-LazyMemmapStorage-RandomSampler-10000] 6.4794ms 2.9972ms 333.6487 Ops/s 318.9917 Ops/s $\color{#35bf28}+4.59\%$
test_sample_rb[TensorDictReplayBuffer-LazyTensorStorage-RandomSampler-10000] 0.1952s 3.5735ms 279.8394 Ops/s 324.1011 Ops/s $\textbf{\color{#d91a1a}-13.66\%}$
test_sample_rb[TensorDictReplayBuffer-ListStorage-SamplerWithoutReplacement-4000] 3.6412ms 2.8111ms 355.7308 Ops/s 335.8884 Ops/s $\textbf{\color{#35bf28}+5.91\%}$
test_sample_rb[TensorDictReplayBuffer-LazyMemmapStorage-SamplerWithoutReplacement-10000] 5.7161ms 3.0392ms 329.0302 Ops/s 322.7702 Ops/s $\color{#35bf28}+1.94\%$
test_sample_rb[TensorDictReplayBuffer-LazyTensorStorage-SamplerWithoutReplacement-10000] 6.3764ms 3.0879ms 323.8437 Ops/s 327.2077 Ops/s $\color{#d91a1a}-1.03\%$
test_sample_rb[TensorDictPrioritizedReplayBuffer-ListStorage-None-4000] 4.3763ms 2.8746ms 347.8754 Ops/s 339.0619 Ops/s $\color{#35bf28}+2.60\%$
test_sample_rb[TensorDictPrioritizedReplayBuffer-LazyMemmapStorage-None-10000] 7.2891ms 3.0099ms 332.2316 Ops/s 315.6490 Ops/s $\textbf{\color{#35bf28}+5.25\%}$
test_sample_rb[TensorDictPrioritizedReplayBuffer-LazyTensorStorage-None-10000] 5.4681ms 2.9824ms 335.3035 Ops/s 312.2358 Ops/s $\textbf{\color{#35bf28}+7.39\%}$
test_iterate_rb[TensorDictReplayBuffer-ListStorage-RandomSampler-4000] 4.0270ms 2.8639ms 349.1781 Ops/s 342.0762 Ops/s $\color{#35bf28}+2.08\%$
test_iterate_rb[TensorDictReplayBuffer-LazyMemmapStorage-RandomSampler-10000] 6.4845ms 2.9901ms 334.4340 Ops/s 319.3169 Ops/s $\color{#35bf28}+4.73\%$
test_iterate_rb[TensorDictReplayBuffer-LazyTensorStorage-RandomSampler-10000] 6.1234ms 3.0137ms 331.8233 Ops/s 272.2206 Ops/s $\textbf{\color{#35bf28}+21.90\%}$
test_iterate_rb[TensorDictReplayBuffer-ListStorage-SamplerWithoutReplacement-4000] 3.4456ms 2.8238ms 354.1376 Ops/s 346.1668 Ops/s $\color{#35bf28}+2.30\%$
test_iterate_rb[TensorDictReplayBuffer-LazyMemmapStorage-SamplerWithoutReplacement-10000] 7.2764ms 3.0656ms 326.1987 Ops/s 326.1256 Ops/s $\color{#35bf28}+0.02\%$
test_iterate_rb[TensorDictReplayBuffer-LazyTensorStorage-SamplerWithoutReplacement-10000] 5.4739ms 2.9712ms 336.5632 Ops/s 321.4512 Ops/s $\color{#35bf28}+4.70\%$
test_iterate_rb[TensorDictPrioritizedReplayBuffer-ListStorage-None-4000] 3.4851ms 2.8062ms 356.3581 Ops/s 337.5327 Ops/s $\textbf{\color{#35bf28}+5.58\%}$
test_iterate_rb[TensorDictPrioritizedReplayBuffer-LazyMemmapStorage-None-10000] 6.3300ms 3.0237ms 330.7247 Ops/s 323.7880 Ops/s $\color{#35bf28}+2.14\%$
test_iterate_rb[TensorDictPrioritizedReplayBuffer-LazyTensorStorage-None-10000] 6.6839ms 3.0575ms 327.0654 Ops/s 324.2452 Ops/s $\color{#35bf28}+0.87\%$
test_populate_rb[TensorDictReplayBuffer-ListStorage-RandomSampler-400] 0.3153s 37.1549ms 26.9144 Ops/s 27.1556 Ops/s $\color{#d91a1a}-0.89\%$
test_populate_rb[TensorDictReplayBuffer-LazyMemmapStorage-RandomSampler-400] 0.2001s 31.6461ms 31.5994 Ops/s 29.5297 Ops/s $\textbf{\color{#35bf28}+7.01\%}$
test_populate_rb[TensorDictReplayBuffer-LazyTensorStorage-RandomSampler-400] 0.2013s 34.5451ms 28.9476 Ops/s 32.5950 Ops/s $\textbf{\color{#d91a1a}-11.19\%}$
test_populate_rb[TensorDictReplayBuffer-ListStorage-SamplerWithoutReplacement-400] 0.1950s 30.7324ms 32.5389 Ops/s 29.0364 Ops/s $\textbf{\color{#35bf28}+12.06\%}$
test_populate_rb[TensorDictReplayBuffer-LazyMemmapStorage-SamplerWithoutReplacement-400] 0.1917s 33.9409ms 29.4630 Ops/s 32.8996 Ops/s $\textbf{\color{#d91a1a}-10.45\%}$
test_populate_rb[TensorDictReplayBuffer-LazyTensorStorage-SamplerWithoutReplacement-400] 0.1909s 30.8285ms 32.4376 Ops/s 29.2550 Ops/s $\textbf{\color{#35bf28}+10.88\%}$
test_populate_rb[TensorDictPrioritizedReplayBuffer-ListStorage-None-400] 0.1924s 34.1757ms 29.2605 Ops/s 32.0015 Ops/s $\textbf{\color{#d91a1a}-8.57\%}$
test_populate_rb[TensorDictPrioritizedReplayBuffer-LazyMemmapStorage-None-400] 0.1991s 30.9688ms 32.2906 Ops/s 29.1909 Ops/s $\textbf{\color{#35bf28}+10.62\%}$
test_populate_rb[TensorDictPrioritizedReplayBuffer-LazyTensorStorage-None-400] 0.1972s 35.1094ms 28.4824 Ops/s 32.5781 Ops/s $\textbf{\color{#d91a1a}-12.57\%}$

Copy link
Contributor

@matteobettini matteobettini left a comment

Choose a reason for hiding this comment

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

LGTM

@vmoens vmoens merged commit 4162e6d into main Sep 20, 2023
@vmoens vmoens deleted the fix_importts branch September 20, 2023 10:29
vmoens added a commit to hyerra/rl that referenced this pull request Oct 10, 2023
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. Refactoring Refactoring of an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] MUJOCO_EGL_DEVICE_ID: 3 on import torchrl
3 participants