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

[BugFix] Fixed import for importlib #1914

Merged
merged 6 commits into from
Feb 25, 2024
Merged

[BugFix] Fixed import for importlib #1914

merged 6 commits into from
Feb 25, 2024

Conversation

DanilBaibak
Copy link
Contributor

Description

There is an issue with import importlib. This cause the warning "Failed to import torchrl C++ binaries" #1888

Testing

Tested locally - see screenshots
Screenshot 2024-02-15 at 16 31 05
Screenshot 2024-02-15 at 16 30 59

  • I have raised an issue to propose this change (required for new features and bug fixes)

Types of changes

What types of changes does your code introduce? Remove all that do not apply:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds core functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (update in the documentation)
  • Example (update in the folder of examples)

Checklist

Go over all the following points, and put an x in all the boxes that apply.
If you are unsure about any of these, don't hesitate to ask. We are here to help!

  • I have read the CONTRIBUTION guide (required)
  • My change requires a change to the documentation.
  • I have updated the tests accordingly (required for a bug fix or a new feature).
  • I have updated the documentation accordingly.

Copy link

pytorch-bot bot commented Feb 15, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/rl/1914

Note: Links to docs will display an error until the docs builds have been completed.

✅ You can merge normally! (1 Unrelated Failure)

As of commit 849d9b1 with merge base bb44067 (image):

BROKEN TRUNK - The following job failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@DanilBaibak DanilBaibak requested a review from vmoens February 15, 2024 15:37
@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 Feb 15, 2024
Copy link

github-actions bot commented Feb 15, 2024

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

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

Expand to view detailed results
Name Max Mean Ops Ops on Repo HEAD Change
test_single 62.8729ms 60.6752ms 16.4812 Ops/s 15.4497 Ops/s $\textbf{\color{#35bf28}+6.68\%}$
test_sync 45.2929ms 39.6687ms 25.2088 Ops/s 26.2001 Ops/s $\color{#d91a1a}-3.78\%$
test_async 64.1257ms 31.9163ms 31.3319 Ops/s 32.7950 Ops/s $\color{#d91a1a}-4.46\%$
test_simple 0.4866s 0.4315s 2.3176 Ops/s 2.2991 Ops/s $\color{#35bf28}+0.80\%$
test_transformed 0.6347s 0.5792s 1.7266 Ops/s 1.7365 Ops/s $\color{#d91a1a}-0.57\%$
test_serial 1.4456s 1.3953s 0.7167 Ops/s 0.7152 Ops/s $\color{#35bf28}+0.21\%$
test_parallel 1.4538s 1.3939s 0.7174 Ops/s 0.7359 Ops/s $\color{#d91a1a}-2.51\%$
test_step_mdp_speed[True-True-True-True-True] 0.1170ms 21.3131μs 46.9194 KOps/s 47.7470 KOps/s $\color{#d91a1a}-1.73\%$
test_step_mdp_speed[True-True-True-True-False] 63.1550μs 12.7013μs 78.7323 KOps/s 77.2774 KOps/s $\color{#35bf28}+1.88\%$
test_step_mdp_speed[True-True-True-False-True] 43.0400μs 12.3928μs 80.6923 KOps/s 80.5940 KOps/s $\color{#35bf28}+0.12\%$
test_step_mdp_speed[True-True-True-False-False] 42.7290μs 7.4175μs 134.8154 KOps/s 132.8686 KOps/s $\color{#35bf28}+1.47\%$
test_step_mdp_speed[True-True-False-True-True] 53.1990μs 22.4068μs 44.6293 KOps/s 44.3561 KOps/s $\color{#35bf28}+0.62\%$
test_step_mdp_speed[True-True-False-True-False] 45.3650μs 13.9939μs 71.4597 KOps/s 69.8866 KOps/s $\color{#35bf28}+2.25\%$
test_step_mdp_speed[True-True-False-False-True] 57.8570μs 13.6043μs 73.5062 KOps/s 74.4622 KOps/s $\color{#d91a1a}-1.28\%$
test_step_mdp_speed[True-True-False-False-False] 38.9330μs 8.7485μs 114.3057 KOps/s 115.6681 KOps/s $\color{#d91a1a}-1.18\%$
test_step_mdp_speed[True-False-True-True-True] 48.7110μs 24.0081μs 41.6527 KOps/s 42.2212 KOps/s $\color{#d91a1a}-1.35\%$
test_step_mdp_speed[True-False-True-True-False] 39.5240μs 15.4674μs 64.6520 KOps/s 64.0160 KOps/s $\color{#35bf28}+0.99\%$
test_step_mdp_speed[True-False-True-False-True] 33.0020μs 13.7106μs 72.9365 KOps/s 74.1845 KOps/s $\color{#d91a1a}-1.68\%$
test_step_mdp_speed[True-False-True-False-False] 34.4940μs 8.7181μs 114.7038 KOps/s 114.7728 KOps/s $\color{#d91a1a}-0.06\%$
test_step_mdp_speed[True-False-False-True-True] 48.0590μs 25.0984μs 39.8431 KOps/s 40.1394 KOps/s $\color{#d91a1a}-0.74\%$
test_step_mdp_speed[True-False-False-True-False] 48.3790μs 16.6159μs 60.1835 KOps/s 59.8865 KOps/s $\color{#35bf28}+0.50\%$
test_step_mdp_speed[True-False-False-False-True] 40.5150μs 14.8968μs 67.1285 KOps/s 67.7514 KOps/s $\color{#d91a1a}-0.92\%$
test_step_mdp_speed[True-False-False-False-False] 30.8470μs 9.9683μs 100.3179 KOps/s 99.8587 KOps/s $\color{#35bf28}+0.46\%$
test_step_mdp_speed[False-True-True-True-True] 73.8470μs 24.0003μs 41.6661 KOps/s 42.0065 KOps/s $\color{#d91a1a}-0.81\%$
test_step_mdp_speed[False-True-True-True-False] 33.5520μs 15.5354μs 64.3693 KOps/s 64.4894 KOps/s $\color{#d91a1a}-0.19\%$
test_step_mdp_speed[False-True-True-False-True] 42.0090μs 15.9492μs 62.6990 KOps/s 63.3031 KOps/s $\color{#d91a1a}-0.95\%$
test_step_mdp_speed[False-True-True-False-False] 29.8160μs 9.9584μs 100.4181 KOps/s 100.7722 KOps/s $\color{#d91a1a}-0.35\%$
test_step_mdp_speed[False-True-False-True-True] 46.9670μs 25.5999μs 39.0626 KOps/s 39.7911 KOps/s $\color{#d91a1a}-1.83\%$
test_step_mdp_speed[False-True-False-True-False] 42.3690μs 16.6265μs 60.1449 KOps/s 60.2525 KOps/s $\color{#d91a1a}-0.18\%$
test_step_mdp_speed[False-True-False-False-True] 45.3040μs 17.0730μs 58.5719 KOps/s 59.0738 KOps/s $\color{#d91a1a}-0.85\%$
test_step_mdp_speed[False-True-False-False-False] 32.9810μs 11.0931μs 90.1465 KOps/s 89.1932 KOps/s $\color{#35bf28}+1.07\%$
test_step_mdp_speed[False-False-True-True-True] 51.6560μs 26.2931μs 38.0328 KOps/s 38.1067 KOps/s $\color{#d91a1a}-0.19\%$
test_step_mdp_speed[False-False-True-True-False] 43.8910μs 17.9545μs 55.6962 KOps/s 55.2881 KOps/s $\color{#35bf28}+0.74\%$
test_step_mdp_speed[False-False-True-False-True] 57.6890μs 16.9243μs 59.0867 KOps/s 58.7521 KOps/s $\color{#35bf28}+0.57\%$
test_step_mdp_speed[False-False-True-False-False] 51.0620μs 11.0559μs 90.4496 KOps/s 89.3098 KOps/s $\color{#35bf28}+1.28\%$
test_step_mdp_speed[False-False-False-True-True] 61.8850μs 27.2890μs 36.6448 KOps/s 36.5168 KOps/s $\color{#35bf28}+0.35\%$
test_step_mdp_speed[False-False-False-True-False] 42.3290μs 18.9944μs 52.6471 KOps/s 52.7940 KOps/s $\color{#d91a1a}-0.28\%$
test_step_mdp_speed[False-False-False-False-True] 46.8160μs 17.9970μs 55.5649 KOps/s 55.6836 KOps/s $\color{#d91a1a}-0.21\%$
test_step_mdp_speed[False-False-False-False-False] 31.3580μs 12.2134μs 81.8772 KOps/s 81.5252 KOps/s $\color{#35bf28}+0.43\%$
test_values[generalized_advantage_estimate-True-True] 9.2559ms 9.0168ms 110.9037 Ops/s 106.3010 Ops/s $\color{#35bf28}+4.33\%$
test_values[vec_generalized_advantage_estimate-True-True] 35.3444ms 33.2421ms 30.0824 Ops/s 28.3928 Ops/s $\textbf{\color{#35bf28}+5.95\%}$
test_values[td0_return_estimate-False-False] 0.2160ms 0.1679ms 5.9551 KOps/s 5.9317 KOps/s $\color{#35bf28}+0.39\%$
test_values[td1_return_estimate-False-False] 25.9047ms 22.6497ms 44.1508 Ops/s 42.7629 Ops/s $\color{#35bf28}+3.25\%$
test_values[vec_td1_return_estimate-False-False] 34.6517ms 33.3799ms 29.9582 Ops/s 28.3309 Ops/s $\textbf{\color{#35bf28}+5.74\%}$
test_values[td_lambda_return_estimate-True-False] 36.2145ms 32.9487ms 30.3502 Ops/s 29.4958 Ops/s $\color{#35bf28}+2.90\%$
test_values[vec_td_lambda_return_estimate-True-False] 34.8263ms 33.3867ms 29.9521 Ops/s 28.3422 Ops/s $\textbf{\color{#35bf28}+5.68\%}$
test_gae_speed[generalized_advantage_estimate-False-1-512] 11.2607ms 7.9807ms 125.3027 Ops/s 122.4093 Ops/s $\color{#35bf28}+2.36\%$
test_gae_speed[vec_generalized_advantage_estimate-True-1-512] 2.0770ms 1.8224ms 548.7406 Ops/s 494.4449 Ops/s $\textbf{\color{#35bf28}+10.98\%}$
test_gae_speed[vec_generalized_advantage_estimate-False-1-512] 0.4213ms 0.3472ms 2.8803 KOps/s 2.8885 KOps/s $\color{#d91a1a}-0.28\%$
test_gae_speed[vec_generalized_advantage_estimate-True-32-512] 43.9523ms 42.5316ms 23.5119 Ops/s 21.8828 Ops/s $\textbf{\color{#35bf28}+7.44\%}$
test_gae_speed[vec_generalized_advantage_estimate-False-32-512] 3.5262ms 3.0215ms 330.9661 Ops/s 330.7775 Ops/s $\color{#35bf28}+0.06\%$
test_dqn_speed 62.7465ms 1.4568ms 686.4587 Ops/s 729.9099 Ops/s $\textbf{\color{#d91a1a}-5.95\%}$
test_ddpg_speed 3.0788ms 2.7663ms 361.4982 Ops/s 358.8661 Ops/s $\color{#35bf28}+0.73\%$
test_sac_speed 9.7903ms 8.2495ms 121.2191 Ops/s 120.3457 Ops/s $\color{#35bf28}+0.73\%$
test_redq_speed 14.2202ms 13.0661ms 76.5337 Ops/s 75.8506 Ops/s $\color{#35bf28}+0.90\%$
test_redq_deprec_speed 14.1375ms 12.9944ms 76.9565 Ops/s 75.9212 Ops/s $\color{#35bf28}+1.36\%$
test_td3_speed 8.4721ms 8.2395ms 121.3668 Ops/s 120.3207 Ops/s $\color{#35bf28}+0.87\%$
test_cql_speed 37.8532ms 36.1612ms 27.6540 Ops/s 27.3739 Ops/s $\color{#35bf28}+1.02\%$
test_a2c_speed 7.9469ms 7.3046ms 136.8998 Ops/s 135.0468 Ops/s $\color{#35bf28}+1.37\%$
test_ppo_speed 8.5837ms 7.5840ms 131.8559 Ops/s 129.8830 Ops/s $\color{#35bf28}+1.52\%$
test_reinforce_speed 7.1690ms 6.5624ms 152.3825 Ops/s 151.0465 Ops/s $\color{#35bf28}+0.88\%$
test_iql_speed 33.9845ms 32.5487ms 30.7232 Ops/s 30.5132 Ops/s $\color{#35bf28}+0.69\%$
test_rb_sample[TensorDictReplayBuffer-ListStorage-RandomSampler-4000] 2.9898ms 2.7686ms 361.1983 Ops/s 366.4115 Ops/s $\color{#d91a1a}-1.42\%$
test_rb_sample[TensorDictReplayBuffer-LazyMemmapStorage-RandomSampler-10000] 0.7842ms 0.5117ms 1.9541 KOps/s 1.9577 KOps/s $\color{#d91a1a}-0.18\%$
test_rb_sample[TensorDictReplayBuffer-LazyTensorStorage-RandomSampler-10000] 0.6086ms 0.4819ms 2.0753 KOps/s 1.9370 KOps/s $\textbf{\color{#35bf28}+7.14\%}$
test_rb_sample[TensorDictReplayBuffer-ListStorage-SamplerWithoutReplacement-4000] 3.4904ms 2.7747ms 360.4030 Ops/s 364.2767 Ops/s $\color{#d91a1a}-1.06\%$
test_rb_sample[TensorDictReplayBuffer-LazyMemmapStorage-SamplerWithoutReplacement-10000] 0.9983ms 0.5141ms 1.9452 KOps/s 1.9751 KOps/s $\color{#d91a1a}-1.51\%$
test_rb_sample[TensorDictReplayBuffer-LazyTensorStorage-SamplerWithoutReplacement-10000] 0.9314ms 0.4798ms 2.0840 KOps/s 2.0726 KOps/s $\color{#35bf28}+0.55\%$
test_rb_sample[TensorDictPrioritizedReplayBuffer-ListStorage-None-4000] 3.0328ms 2.8255ms 353.9189 Ops/s 356.3124 Ops/s $\color{#d91a1a}-0.67\%$
test_rb_sample[TensorDictPrioritizedReplayBuffer-LazyMemmapStorage-None-10000] 1.0427ms 0.6432ms 1.5547 KOps/s 1.5874 KOps/s $\color{#d91a1a}-2.06\%$
test_rb_sample[TensorDictPrioritizedReplayBuffer-LazyTensorStorage-None-10000] 0.8831ms 0.6009ms 1.6642 KOps/s 1.6472 KOps/s $\color{#35bf28}+1.03\%$
test_rb_iterate[TensorDictReplayBuffer-ListStorage-RandomSampler-4000] 2.9489ms 2.7344ms 365.7056 Ops/s 370.9897 Ops/s $\color{#d91a1a}-1.42\%$
test_rb_iterate[TensorDictReplayBuffer-LazyMemmapStorage-RandomSampler-10000] 0.7852ms 0.5138ms 1.9464 KOps/s 1.9570 KOps/s $\color{#d91a1a}-0.54\%$
test_rb_iterate[TensorDictReplayBuffer-LazyTensorStorage-RandomSampler-10000] 0.7739ms 0.4874ms 2.0515 KOps/s 2.0392 KOps/s $\color{#35bf28}+0.61\%$
test_rb_iterate[TensorDictReplayBuffer-ListStorage-SamplerWithoutReplacement-4000] 2.9677ms 2.7048ms 369.7114 Ops/s 364.4305 Ops/s $\color{#35bf28}+1.45\%$
test_rb_iterate[TensorDictReplayBuffer-LazyMemmapStorage-SamplerWithoutReplacement-10000] 0.6413ms 0.5036ms 1.9857 KOps/s 1.9797 KOps/s $\color{#35bf28}+0.30\%$
test_rb_iterate[TensorDictReplayBuffer-LazyTensorStorage-SamplerWithoutReplacement-10000] 0.7896ms 0.4775ms 2.0944 KOps/s 2.0754 KOps/s $\color{#35bf28}+0.92\%$
test_rb_iterate[TensorDictPrioritizedReplayBuffer-ListStorage-None-4000] 3.2747ms 2.9111ms 343.5112 Ops/s 350.6307 Ops/s $\color{#d91a1a}-2.03\%$
test_rb_iterate[TensorDictPrioritizedReplayBuffer-LazyMemmapStorage-None-10000] 0.9637ms 0.6314ms 1.5839 KOps/s 1.6001 KOps/s $\color{#d91a1a}-1.02\%$
test_rb_iterate[TensorDictPrioritizedReplayBuffer-LazyTensorStorage-None-10000] 0.9633ms 0.5995ms 1.6680 KOps/s 1.6586 KOps/s $\color{#35bf28}+0.57\%$
test_rb_populate[TensorDictReplayBuffer-ListStorage-RandomSampler-400] 99.1329ms 7.5921ms 131.7162 Ops/s 130.7635 Ops/s $\color{#35bf28}+0.73\%$
test_rb_populate[TensorDictReplayBuffer-LazyMemmapStorage-RandomSampler-400] 95.6388ms 14.7995ms 67.5698 Ops/s 76.4178 Ops/s $\textbf{\color{#d91a1a}-11.58\%}$
test_rb_populate[TensorDictReplayBuffer-LazyTensorStorage-RandomSampler-400] 3.5991ms 2.4984ms 400.2555 Ops/s 395.9587 Ops/s $\color{#35bf28}+1.09\%$
test_rb_populate[TensorDictReplayBuffer-ListStorage-SamplerWithoutReplacement-400] 89.7142ms 7.3693ms 135.6973 Ops/s 111.1017 Ops/s $\textbf{\color{#35bf28}+22.14\%}$
test_rb_populate[TensorDictReplayBuffer-LazyMemmapStorage-SamplerWithoutReplacement-400] 15.3987ms 13.0504ms 76.6262 Ops/s 76.4922 Ops/s $\color{#35bf28}+0.18\%$
test_rb_populate[TensorDictReplayBuffer-LazyTensorStorage-SamplerWithoutReplacement-400] 4.4677ms 2.5428ms 393.2629 Ops/s 391.1170 Ops/s $\color{#35bf28}+0.55\%$
test_rb_populate[TensorDictPrioritizedReplayBuffer-ListStorage-None-400] 90.7179ms 9.3929ms 106.4632 Ops/s 106.1749 Ops/s $\color{#35bf28}+0.27\%$
test_rb_populate[TensorDictPrioritizedReplayBuffer-LazyMemmapStorage-None-400] 15.5874ms 13.2745ms 75.3325 Ops/s 74.5676 Ops/s $\color{#35bf28}+1.03\%$
test_rb_populate[TensorDictPrioritizedReplayBuffer-LazyTensorStorage-None-400] 4.5131ms 2.7782ms 359.9449 Ops/s 358.0751 Ops/s $\color{#35bf28}+0.52\%$

@vmoens
Copy link
Contributor

vmoens commented Feb 15, 2024

Looks ok but I'm not sure it fixes the issue
We should test this on an apple silicon node

$ pip3 install torch==2.2 torchrl==0.3.0 torchvision==0.17
$ python -c """import torchrl
torchrl.data.PrioritizedSampler(100, 1.0, 1.0)
"""

and check it works even if the warning is raised.
I suspect the wheels are broken on some platforms, if they're not this fix will suppress the unwanted warning.
I'll try this tonight!

@vmoens
Copy link
Contributor

vmoens commented Feb 15, 2024

Testing on linux, the code snippet above gives no warning by the way

@DanilBaibak
Copy link
Contributor Author

Let's wait until the M1 build is ready and than I can test it locally.

Copy link

github-actions bot commented Feb 15, 2024

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

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

Expand to view detailed results
Name Max Mean Ops Ops on Repo HEAD Change
test_single 0.1168s 0.1165s 8.5827 Ops/s 8.2342 Ops/s $\color{#35bf28}+4.23\%$
test_sync 96.2323ms 95.9853ms 10.4183 Ops/s 10.4087 Ops/s $\color{#35bf28}+0.09\%$
test_async 0.1818s 92.0450ms 10.8643 Ops/s 10.8900 Ops/s $\color{#d91a1a}-0.24\%$
test_single_pixels 0.2104s 0.1479s 6.7631 Ops/s 7.7804 Ops/s $\textbf{\color{#d91a1a}-13.08\%}$
test_sync_pixels 83.4647ms 82.5181ms 12.1185 Ops/s 12.1805 Ops/s $\color{#d91a1a}-0.51\%$
test_async_pixels 0.1479s 73.3955ms 13.6248 Ops/s 13.7916 Ops/s $\color{#d91a1a}-1.21\%$
test_simple 0.8692s 0.8420s 1.1877 Ops/s 1.1802 Ops/s $\color{#35bf28}+0.63\%$
test_transformed 1.0682s 1.0675s 0.9367 Ops/s 0.9338 Ops/s $\color{#35bf28}+0.32\%$
test_serial 2.5883s 2.5404s 0.3936 Ops/s 0.3967 Ops/s $\color{#d91a1a}-0.77\%$
test_parallel 2.1391s 2.1180s 0.4721 Ops/s 0.4794 Ops/s $\color{#d91a1a}-1.51\%$
test_step_mdp_speed[True-True-True-True-True] 79.6100μs 34.1999μs 29.2399 KOps/s 29.1388 KOps/s $\color{#35bf28}+0.35\%$
test_step_mdp_speed[True-True-True-True-False] 38.8200μs 20.4257μs 48.9579 KOps/s 50.0978 KOps/s $\color{#d91a1a}-2.28\%$
test_step_mdp_speed[True-True-True-False-True] 41.3600μs 19.6153μs 50.9806 KOps/s 52.6079 KOps/s $\color{#d91a1a}-3.09\%$
test_step_mdp_speed[True-True-True-False-False] 30.2600μs 11.3190μs 88.3474 KOps/s 89.3635 KOps/s $\color{#d91a1a}-1.14\%$
test_step_mdp_speed[True-True-False-True-True] 70.7300μs 35.2191μs 28.3937 KOps/s 28.3789 KOps/s $\color{#35bf28}+0.05\%$
test_step_mdp_speed[True-True-False-True-False] 47.9500μs 22.0136μs 45.4264 KOps/s 46.8320 KOps/s $\color{#d91a1a}-3.00\%$
test_step_mdp_speed[True-True-False-False-True] 48.0810μs 21.4043μs 46.7196 KOps/s 48.3487 KOps/s $\color{#d91a1a}-3.37\%$
test_step_mdp_speed[True-True-False-False-False] 67.4300μs 13.5954μs 73.5543 KOps/s 77.0135 KOps/s $\color{#d91a1a}-4.49\%$
test_step_mdp_speed[True-False-True-True-True] 60.1210μs 37.3201μs 26.7952 KOps/s 26.5436 KOps/s $\color{#35bf28}+0.95\%$
test_step_mdp_speed[True-False-True-True-False] 51.2600μs 24.2688μs 41.2051 KOps/s 42.5844 KOps/s $\color{#d91a1a}-3.24\%$
test_step_mdp_speed[True-False-True-False-True] 44.0700μs 20.9509μs 47.7306 KOps/s 47.7270 KOps/s $+0.01\%$
test_step_mdp_speed[True-False-True-False-False] 45.8800μs 13.5424μs 73.8421 KOps/s 76.9392 KOps/s $\color{#d91a1a}-4.03\%$
test_step_mdp_speed[True-False-False-True-True] 69.2100μs 38.9810μs 25.6535 KOps/s 25.7305 KOps/s $\color{#d91a1a}-0.30\%$
test_step_mdp_speed[True-False-False-True-False] 54.3100μs 25.6889μs 38.9273 KOps/s 39.5927 KOps/s $\color{#d91a1a}-1.68\%$
test_step_mdp_speed[True-False-False-False-True] 67.1400μs 22.8081μs 43.8441 KOps/s 44.5988 KOps/s $\color{#d91a1a}-1.69\%$
test_step_mdp_speed[True-False-False-False-False] 37.0800μs 15.3229μs 65.2616 KOps/s 68.0303 KOps/s $\color{#d91a1a}-4.07\%$
test_step_mdp_speed[False-True-True-True-True] 64.0410μs 37.6601μs 26.5533 KOps/s 26.9202 KOps/s $\color{#d91a1a}-1.36\%$
test_step_mdp_speed[False-True-True-True-False] 49.2610μs 24.2389μs 41.2560 KOps/s 42.3904 KOps/s $\color{#d91a1a}-2.68\%$
test_step_mdp_speed[False-True-True-False-True] 46.8700μs 25.0684μs 39.8908 KOps/s 39.9634 KOps/s $\color{#d91a1a}-0.18\%$
test_step_mdp_speed[False-True-True-False-False] 46.8310μs 15.3858μs 64.9950 KOps/s 65.3607 KOps/s $\color{#d91a1a}-0.56\%$
test_step_mdp_speed[False-True-False-True-True] 95.3900μs 39.1973μs 25.5120 KOps/s 25.4064 KOps/s $\color{#35bf28}+0.42\%$
test_step_mdp_speed[False-True-False-True-False] 47.3910μs 26.0541μs 38.3816 KOps/s 39.2657 KOps/s $\color{#d91a1a}-2.25\%$
test_step_mdp_speed[False-True-False-False-True] 52.4600μs 26.7944μs 37.3213 KOps/s 38.0602 KOps/s $\color{#d91a1a}-1.94\%$
test_step_mdp_speed[False-True-False-False-False] 43.8900μs 17.3174μs 57.7453 KOps/s 60.5942 KOps/s $\color{#d91a1a}-4.70\%$
test_step_mdp_speed[False-False-True-True-True] 83.0700μs 41.6454μs 24.0123 KOps/s 24.6806 KOps/s $\color{#d91a1a}-2.71\%$
test_step_mdp_speed[False-False-True-True-False] 60.3010μs 28.3388μs 35.2873 KOps/s 36.6728 KOps/s $\color{#d91a1a}-3.78\%$
test_step_mdp_speed[False-False-True-False-True] 48.1100μs 26.9143μs 37.1549 KOps/s 37.2430 KOps/s $\color{#d91a1a}-0.24\%$
test_step_mdp_speed[False-False-True-False-False] 37.6300μs 17.3725μs 57.5623 KOps/s 59.0041 KOps/s $\color{#d91a1a}-2.44\%$
test_step_mdp_speed[False-False-False-True-True] 67.8310μs 42.6194μs 23.4635 KOps/s 23.6558 KOps/s $\color{#d91a1a}-0.81\%$
test_step_mdp_speed[False-False-False-True-False] 48.6000μs 29.7000μs 33.6700 KOps/s 34.3093 KOps/s $\color{#d91a1a}-1.86\%$
test_step_mdp_speed[False-False-False-False-True] 53.5200μs 28.4814μs 35.1106 KOps/s 35.8474 KOps/s $\color{#d91a1a}-2.06\%$
test_step_mdp_speed[False-False-False-False-False] 42.4800μs 18.9833μs 52.6779 KOps/s 54.1382 KOps/s $\color{#d91a1a}-2.70\%$
test_values[generalized_advantage_estimate-True-True] 26.3485ms 25.9025ms 38.6063 Ops/s 39.6807 Ops/s $\color{#d91a1a}-2.71\%$
test_values[vec_generalized_advantage_estimate-True-True] 84.4442ms 3.2667ms 306.1186 Ops/s 309.9486 Ops/s $\color{#d91a1a}-1.24\%$
test_values[td0_return_estimate-False-False] 0.1026ms 62.5564μs 15.9856 KOps/s 15.9769 KOps/s $\color{#35bf28}+0.05\%$
test_values[td1_return_estimate-False-False] 56.8191ms 55.7204ms 17.9467 Ops/s 18.4507 Ops/s $\color{#d91a1a}-2.73\%$
test_values[vec_td1_return_estimate-False-False] 2.1069ms 1.7801ms 561.7741 Ops/s 565.9656 Ops/s $\color{#d91a1a}-0.74\%$
test_values[td_lambda_return_estimate-True-False] 89.3865ms 88.2841ms 11.3271 Ops/s 11.5638 Ops/s $\color{#d91a1a}-2.05\%$
test_values[vec_td_lambda_return_estimate-True-False] 3.8852ms 1.8132ms 551.5125 Ops/s 549.7145 Ops/s $\color{#35bf28}+0.33\%$
test_gae_speed[generalized_advantage_estimate-False-1-512] 24.8687ms 24.7025ms 40.4817 Ops/s 41.6389 Ops/s $\color{#d91a1a}-2.78\%$
test_gae_speed[vec_generalized_advantage_estimate-True-1-512] 0.9142ms 0.7225ms 1.3841 KOps/s 1.4061 KOps/s $\color{#d91a1a}-1.57\%$
test_gae_speed[vec_generalized_advantage_estimate-False-1-512] 0.7241ms 0.6693ms 1.4942 KOps/s 1.5204 KOps/s $\color{#d91a1a}-1.73\%$
test_gae_speed[vec_generalized_advantage_estimate-True-32-512] 1.5141ms 1.4724ms 679.1420 Ops/s 683.9567 Ops/s $\color{#d91a1a}-0.70\%$
test_gae_speed[vec_generalized_advantage_estimate-False-32-512] 0.9429ms 0.6904ms 1.4483 KOps/s 1.4690 KOps/s $\color{#d91a1a}-1.41\%$
test_dqn_speed 3.8833ms 1.5081ms 663.1054 Ops/s 675.3295 Ops/s $\color{#d91a1a}-1.81\%$
test_ddpg_speed 4.0796ms 2.9287ms 341.4496 Ops/s 348.3199 Ops/s $\color{#d91a1a}-1.97\%$
test_sac_speed 8.8795ms 8.3363ms 119.9578 Ops/s 121.0711 Ops/s $\color{#d91a1a}-0.92\%$
test_redq_speed 12.4203ms 10.3953ms 96.1971 Ops/s 97.5782 Ops/s $\color{#d91a1a}-1.42\%$
test_redq_deprec_speed 11.8734ms 11.4544ms 87.3028 Ops/s 90.2626 Ops/s $\color{#d91a1a}-3.28\%$
test_td3_speed 8.5634ms 8.3800ms 119.3315 Ops/s 119.3027 Ops/s $\color{#35bf28}+0.02\%$
test_cql_speed 26.8215ms 25.5340ms 39.1635 Ops/s 39.1832 Ops/s $\color{#d91a1a}-0.05\%$
test_a2c_speed 5.9153ms 5.6502ms 176.9840 Ops/s 182.8502 Ops/s $\color{#d91a1a}-3.21\%$
test_ppo_speed 6.1736ms 5.9081ms 169.2592 Ops/s 171.5891 Ops/s $\color{#d91a1a}-1.36\%$
test_reinforce_speed 5.3922ms 4.6387ms 215.5786 Ops/s 222.0225 Ops/s $\color{#d91a1a}-2.90\%$
test_iql_speed 20.0311ms 19.5138ms 51.2458 Ops/s 51.9399 Ops/s $\color{#d91a1a}-1.34\%$
test_rb_sample[TensorDictReplayBuffer-ListStorage-RandomSampler-4000] 3.8887ms 3.7482ms 266.7970 Ops/s 267.3693 Ops/s $\color{#d91a1a}-0.21\%$
test_rb_sample[TensorDictReplayBuffer-LazyMemmapStorage-RandomSampler-10000] 0.7895ms 0.5614ms 1.7812 KOps/s 1.7636 KOps/s $\color{#35bf28}+1.00\%$
test_rb_sample[TensorDictReplayBuffer-LazyTensorStorage-RandomSampler-10000] 0.6868ms 0.5375ms 1.8605 KOps/s 1.8643 KOps/s $\color{#d91a1a}-0.21\%$
test_rb_sample[TensorDictReplayBuffer-ListStorage-SamplerWithoutReplacement-4000] 3.9860ms 3.7695ms 265.2902 Ops/s 269.8508 Ops/s $\color{#d91a1a}-1.69\%$
test_rb_sample[TensorDictReplayBuffer-LazyMemmapStorage-SamplerWithoutReplacement-10000] 0.6771ms 0.5540ms 1.8051 KOps/s 1.7918 KOps/s $\color{#35bf28}+0.74\%$
test_rb_sample[TensorDictReplayBuffer-LazyTensorStorage-SamplerWithoutReplacement-10000] 0.6478ms 0.5293ms 1.8894 KOps/s 1.8886 KOps/s $\color{#35bf28}+0.04\%$
test_rb_sample[TensorDictPrioritizedReplayBuffer-ListStorage-None-4000] 3.9654ms 3.8648ms 258.7483 Ops/s 259.2189 Ops/s $\color{#d91a1a}-0.18\%$
test_rb_sample[TensorDictPrioritizedReplayBuffer-LazyMemmapStorage-None-10000] 0.9087ms 0.6907ms 1.4479 KOps/s 1.4442 KOps/s $\color{#35bf28}+0.25\%$
test_rb_sample[TensorDictPrioritizedReplayBuffer-LazyTensorStorage-None-10000] 0.8068ms 0.6611ms 1.5126 KOps/s 1.5234 KOps/s $\color{#d91a1a}-0.71\%$
test_rb_iterate[TensorDictReplayBuffer-ListStorage-RandomSampler-4000] 4.0151ms 3.7557ms 266.2650 Ops/s 267.7500 Ops/s $\color{#d91a1a}-0.55\%$
test_rb_iterate[TensorDictReplayBuffer-LazyMemmapStorage-RandomSampler-10000] 0.8532ms 0.5632ms 1.7756 KOps/s 1.7725 KOps/s $\color{#35bf28}+0.17\%$
test_rb_iterate[TensorDictReplayBuffer-LazyTensorStorage-RandomSampler-10000] 0.7332ms 0.5369ms 1.8624 KOps/s 1.8767 KOps/s $\color{#d91a1a}-0.76\%$
test_rb_iterate[TensorDictReplayBuffer-ListStorage-SamplerWithoutReplacement-4000] 3.9916ms 3.7664ms 265.5022 Ops/s 266.4009 Ops/s $\color{#d91a1a}-0.34\%$
test_rb_iterate[TensorDictReplayBuffer-LazyMemmapStorage-SamplerWithoutReplacement-10000] 0.7134ms 0.5614ms 1.7811 KOps/s 1.5084 KOps/s $\textbf{\color{#35bf28}+18.08\%}$
test_rb_iterate[TensorDictReplayBuffer-LazyTensorStorage-SamplerWithoutReplacement-10000] 0.8784ms 0.5332ms 1.8755 KOps/s 1.8925 KOps/s $\color{#d91a1a}-0.90\%$
test_rb_iterate[TensorDictPrioritizedReplayBuffer-ListStorage-None-4000] 4.5204ms 3.8953ms 256.7170 Ops/s 258.6152 Ops/s $\color{#d91a1a}-0.73\%$
test_rb_iterate[TensorDictPrioritizedReplayBuffer-LazyMemmapStorage-None-10000] 0.9451ms 0.6952ms 1.4385 KOps/s 1.4447 KOps/s $\color{#d91a1a}-0.43\%$
test_rb_iterate[TensorDictPrioritizedReplayBuffer-LazyTensorStorage-None-10000] 0.8611ms 0.6621ms 1.5103 KOps/s 1.5069 KOps/s $\color{#35bf28}+0.23\%$
test_rb_populate[TensorDictReplayBuffer-ListStorage-RandomSampler-400] 0.1222s 9.7050ms 103.0394 Ops/s 108.5496 Ops/s $\textbf{\color{#d91a1a}-5.08\%}$
test_rb_populate[TensorDictReplayBuffer-LazyMemmapStorage-RandomSampler-400] 18.6892ms 16.4124ms 60.9294 Ops/s 60.4077 Ops/s $\color{#35bf28}+0.86\%$
test_rb_populate[TensorDictReplayBuffer-LazyTensorStorage-RandomSampler-400] 8.3508ms 3.1785ms 314.6137 Ops/s 326.0221 Ops/s $\color{#d91a1a}-3.50\%$
test_rb_populate[TensorDictReplayBuffer-ListStorage-SamplerWithoutReplacement-400] 0.1005s 11.1797ms 89.4480 Ops/s 90.6546 Ops/s $\color{#d91a1a}-1.33\%$
test_rb_populate[TensorDictReplayBuffer-LazyMemmapStorage-SamplerWithoutReplacement-400] 18.4061ms 16.5241ms 60.5177 Ops/s 61.3383 Ops/s $\color{#d91a1a}-1.34\%$
test_rb_populate[TensorDictReplayBuffer-LazyTensorStorage-SamplerWithoutReplacement-400] 8.1620ms 3.2147ms 311.0663 Ops/s 320.8991 Ops/s $\color{#d91a1a}-3.06\%$
test_rb_populate[TensorDictPrioritizedReplayBuffer-ListStorage-None-400] 0.1027s 11.4390ms 87.4200 Ops/s 88.0604 Ops/s $\color{#d91a1a}-0.73\%$
test_rb_populate[TensorDictPrioritizedReplayBuffer-LazyMemmapStorage-None-400] 19.5858ms 16.9005ms 59.1699 Ops/s 60.5831 Ops/s $\color{#d91a1a}-2.33\%$
test_rb_populate[TensorDictPrioritizedReplayBuffer-LazyTensorStorage-None-400] 5.8465ms 3.3912ms 294.8771 Ops/s 297.8217 Ops/s $\color{#d91a1a}-0.99\%$

@vmoens vmoens changed the title Fixed import for importlib [BugFix] Fixed import for importlib Feb 15, 2024
@vmoens vmoens added bug Something isn't working Suitable for minor Suitable to be integrated in minor release (no new feature) labels Feb 15, 2024
@DanilBaibak DanilBaibak added the ciflow/binaries/all Build all binaries label Feb 16, 2024
Copy link

pytorch-bot bot commented Feb 16, 2024

No ciflow labels are configured for this repo.
For information on how to enable CIFlow bot see this wiki

Copy link
Contributor

@vmoens vmoens left a comment

Choose a reason for hiding this comment

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

What about adding a quick smoke test in the M1 binary built

import torchrl
torchrl.data.PrioritizedSampler(100, 1.0, 1.0)

If this runs the C++ binaries have been built properly (and if a warning is raised it should be ignored and fixed).

@vmoens vmoens merged commit 8f04818 into main Feb 25, 2024
75 of 76 checks passed
@vmoens vmoens deleted the Fix-importlib-Import branch February 25, 2024 00:53
vmoens added a commit that referenced this pull request Feb 28, 2024
Co-authored-by: vmoens <vincentmoens@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ciflow/binaries/all Build all binaries CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Suitable for minor Suitable to be integrated in minor release (no new feature)
Projects
None yet
3 participants