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

[Docs] Readme update #19

Merged
merged 16 commits into from
Oct 2, 2023
2 changes: 1 addition & 1 deletion .github/unittest/install_dependencies.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@


python -m pip install --upgrade pip
python -m pip install flake8 pytest pytest-cov hydra-core
python -m pip install flake8 pytest pytest-cov hydra-core tqdm

if [ -f requirements.txt ]; then pip install -r requirements.txt; fi

Expand Down
89 changes: 87 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,88 @@
# BenchMARL
[![tests](https://github.com/facebookresearch/BenchMARL/actions/workflows/unit_tests.yml/badge.svg)](test)
[![Python](https://img.shields.io/badge/python-3.8%20%7C%203.9%20%7C%203.10-blue.svg)](https://www.python.org/downloads/)

```bash
python benchmarl/run.py algorithm=mappo task=vmas/balance
```

BenchMARL is a Multi-Agent Reinforcement Learning (MARL) training library created to enable reproducibility
and benchmarking across different MARL algorithms and environments.
Its mission is to present a standardized interface that allows easy integration of new algorithms and environments to
provide a fair comparison with existing solutions.
BenchMARL uses [TorchRL](https://github.com/pytorch/rl) as its backend, which grants it high performance
and state-of-the-art implementations.
BenchMARL data reporting is compatible with [marl-eval](https://github.com/instadeepai/marl-eval) for standardized and
statistically strong evaluations.

- [BenchMARL](#benchmarl)
* [How to use](#how-to-use)
+ [Notebooks](#notebooks)
+ [Install](#install)
+ [Run](#run)
* [Concept](#concept)
+ [Experiment](#experiment)
+ [Algorithms](#algorithms)
+ [Environments](#environments)
+ [Models](#models)
* [Reporting and plotting](#reporting-and-plotting)
* [Extending](#extending)
* [Configuring](#configuring)
+ [Algorithm](#algorithm)
+ [Task](#task)
+ [Model](#model)
- [Sequence model](#sequence-model)
* [Features](#features)
+ [Logging](#logging)
+ [Checkpointing](#checkpointing)
+ [Callbacks](#callbacks)


## How to use

### Notebooks

### Install

#### Install TorchRL

Currently BenchMARL uses the latest version of TorchRL,
this will be installed automatically in future versions.

```bash
pip install git+https://github.com/pytorch-labs/tensordict
git clone https://github.com/pytorch/rl.git
cd rl
python setup.py develop
cd ..
Comment on lines +53 to +57
Copy link
Collaborator Author

@matteobettini matteobettini Sep 27, 2023

Choose a reason for hiding this comment

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

@vmoens
This is currently the only way i am able to install torchrl nightly.

This is because of many issues:

  • the MacOS compatibility prevents from using the nightly dependency
  • the torchrl._torchrl makes it so that pip install git+https://github.com/pytorch/rl.git and git clone + pip install -e . do not work

Telling the users to clone rl seems a lot to me, is there any workaround?

Copy link
Contributor

Choose a reason for hiding this comment

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

sorry i missed your tag
oh yes I know about that, there's an easy fix, let me take care of it

```

#### Install BenchMARL
You can just install it from github
```bash
pip install git+https://github.com/facebookresearch/BenchMARL
```
Or also clone it locally to access the configs and scripts
```bash
git clone https://github.com/facebookresearch/BenchMARL.git
pip install -e BenchMARL
```

### Run


## Concept
### Experiment
### Algorithms
### Environments
### Models

## Reporting and plotting

## Extending

## Hydra config

## Configuring

Running custom experiments is extremely simplified by the [Hydra](https://hydra.cc/) configurations.

Expand Down Expand Up @@ -74,7 +153,10 @@ Configuring a layer
python hydra_run.py "model.layers.l1.num_cells=[3]"
```

## Logging

## Features

### Logging

BenchMARL is compatible with the [TorchRL loggers](https://github.com/pytorch/rl/tree/main/torchrl/record/loggers).
A list of logger names can be provided in the [experiment config](benchmarl/conf/experiment/base_experiment.yaml).
Expand All @@ -86,3 +168,6 @@ python hydra_run.py "experiment.loggers=[wandb]"

Additionally, you can specify a `create_json` argument which instructs the trainer to output a `.json` file in the
format specified by [marl-eval](https://github.com/instadeepai/marl-eval).

### Checkpointing
### Callbacks
1 change: 0 additions & 1 deletion requirements.txt

This file was deleted.

6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
author="Matteo Bettini",
author_email="[email protected]",
packages=find_packages(),
install_requires=["torchrl", "tqdm", "hydra-core"],
install_requires=["tqdm", "hydra-core"],
extras_require={
"tasks": ["vmas>=1.2.10", "pettingzoo[all]>=1.24.1"],
"vmas": ["vmas>=1.2.10"],
"pettingzoo": ["pettingzoo[all]>=1.24.1"],
},
include_package_data=True,
)
Loading