facebookresearch / BenchMARL

A collection of MARL benchmarks based on TorchRL
https://benchmarl.readthedocs.io/
MIT License
191 stars 23 forks source link

[Feature] Allow multipe inputs to models #73

Closed matteobettini closed 3 months ago

matteobettini commented 3 months ago

This PR allows multiple inputs to models (given from their input spec)

The current models will behave in the following way:

In this PR we move the concatenation of actions and state (that was happening in the SAC and DDPG algorithms) to the model by directly feeding both inputs

cc @ezhang7423

codecov-commenter commented 3 months ago

Codecov Report

Attention: Patch coverage is 87.50000% with 25 lines in your changes are missing coverage. Please review.

Project coverage is 53.83%. Comparing base (e6afcf5) to head (f4118c5).

Files Patch % Lines
benchmarl/models/cnn.py 88.88% 13 Missing :warning:
benchmarl/models/common.py 60.00% 4 Missing :warning:
benchmarl/models/mlp.py 76.92% 3 Missing :warning:
benchmarl/models/gnn.py 81.81% 2 Missing :warning:
benchmarl/algorithms/maddpg.py 0.00% 1 Missing :warning:
benchmarl/algorithms/masac.py 0.00% 1 Missing :warning:
test/test_models.py 97.72% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #73 +/- ## =========================================== - Coverage 89.99% 53.83% -36.17% =========================================== Files 69 70 +1 Lines 2739 2907 +168 =========================================== - Hits 2465 1565 -900 - Misses 274 1342 +1068 ```

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