alex-petrenko / sample-factory

High throughput synchronous and asynchronous reinforcement learning
https://samplefactory.dev
MIT License
773 stars 106 forks source link

Introduce performance evaluation #288

Closed BartekCupial closed 6 months ago

BartekCupial commented 6 months ago

Overview

This PR introduces a new script, eval.py, designed for faster evaluation using multiple environments and leveraging the efficiency of the Sample Factory sampler. Additionally, an example usage of eval.py is demonstrated in the added eval_mujoco.py script within sf_examples.

Key Changes

BartekCupial commented 6 months ago

I'm getting this message when the script finishes, not sure yet why.

[W CudaIPCTypes.cpp:15] Producer process has been terminated before all shared CUDA tensors released. See Note [Sharing CUDA tensors]
BartekCupial commented 6 months ago

@alex-petrenko can I ask for the review, please?

codecov-commenter commented 6 months ago

Codecov Report

Attention: 318 lines in your changes are missing coverage. Please review.

Comparison is base (6379cf9) 79.52% compared to head (a5fde39) 76.32%.

Files Patch % Lines
...e_factory/algo/sampling/evaluation_sampling_api.py 0.00% 194 Missing :warning:
sample_factory/eval.py 0.00% 84 Missing :warning:
sf_examples/mujoco/fast_eval_mujoco.py 0.00% 16 Missing :warning:
sample_factory/cfg/arguments.py 7.14% 13 Missing :warning:
sample_factory/envs/env_wrappers.py 28.57% 10 Missing :warning:
sample_factory/envs/create_env.py 66.66% 1 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #288 +/- ## ========================================== - Coverage 79.52% 76.32% -3.20% ========================================== Files 97 100 +3 Lines 7517 7845 +328 ========================================== + Hits 5978 5988 +10 - Misses 1539 1857 +318 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

klyuchnikova-ana commented 6 months ago

I'm getting this message when the script finishes, not sure yet why.

[W CudaIPCTypes.cpp:15] Producer process has been terminated before all shared CUDA tensors released. See Note [Sharing CUDA tensors]

Yes, this started to happen after some PyTorch update. I've been meaning to investigate, but I also found that it's totally harmless and in practice can be ignored.