https://github.com/cn-upb/deepcomp

Dynamic multi-cell selection for cooperative multipoint (CoMP) using (multi-agent) deep reinforcement learning

https://github.com/cn-upb/deepcomp

Science Score: 10.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    1 of 5 committers (20.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (15.0%) to scientific vocabulary

Keywords

cell-selection cellular comp mobile multi-agent-reinforcement-learning ppo python ray reinforcement-learning rllib simulation wireless
Last synced: 5 months ago · JSON representation

Repository

Dynamic multi-cell selection for cooperative multipoint (CoMP) using (multi-agent) deep reinforcement learning

Basic Info
Statistics
  • Stars: 64
  • Watchers: 6
  • Forks: 15
  • Open Issues: 0
  • Releases: 23
Topics
cell-selection cellular comp mobile multi-agent-reinforcement-learning ppo python ray reinforcement-learning rllib simulation wireless
Created almost 6 years ago · Last pushed over 2 years ago
Metadata Files
Readme License

README.md

CI PyPi Docker Pulls DeepSource

DeepCoMP: Self-Learning Dynamic Multi-Cell Selection for Coordinated Multipoint (CoMP)

Multi-Agent Deep Reinforcement Learning for Coordinated Multipoint in Mobile Networks

Three variants: DeepCoMP (central agent), DD-CoMP (distributed agents using central policy), D3-CoMP (distributed agents with separate policies). All three approaches self-learn and adapt to various scenarios in mobile networks without expert knowledge, human intervention, or detailed assumptions about the underlying system. Compared to other approaches, they are more flexible and achieve higher Quality of Experience.

For a high-level overview of DeepCoMP, please refer to my blog post. More details are available in our research paper presenting DeepCoMP (preprint). I also talked about DeepCoMP at the Ray Summit 2021 (YouTube).

The simulation environment used to train DeepCoMP is available separately as mobile-env.


Visualized cell selection policy of DeepCoMP after 2M training steps.
Base station icon by Clea Doltz from the Noun Project

Citation

If you use this code, please cite our paper (preprint; accepted at IEEE TNSM 2023):

@article{schneider2023deepcomp, title={Multi-Agent Deep Reinforcement Learning for Coordinated Multipoint in Mobile Networks}, author={Schneider, Stefan and Karl, Holger and Khalili, Ramin and Hecker, Artur}, journal={IEEE Transactions on Network and Service Management (TNSM)}, year={2023}, }

Setup

You need Python 3.8+. You can install deepcomp either directly from PyPi or manually after cloning this repository.

Simple Installation via PyPi

``` sudo apt update sudo apt upgrade sudo apt install cmake build-essential zlib1g-dev python3-dev

pip install deepcomp ```

Manual Installation from Source

For adjusting or further developing DeepCoMP, it's better to install manually rather than from PyPi. Clone the repository. Then install everything, following these steps:

```

only on ubuntu

sudo apt update sudo apt upgrade sudo apt install cmake build-essential zlib1g-dev python3-dev

clone

git clone git@github.com:CN-UPB/DeepCoMP.git cd DeepCoMP

install all python dependencies

pip install .

"python setup.py install" does not work for some reason: https://stackoverflow.com/a/66267232/2745116

for development install (when changing code): pip install -e .

```

Tested on Ubuntu 20.04 and Windows 10 with Python 3.8.

For saving videos and gifs, you also need to install ffmpeg (not on Windows) and ImageMagick. On Ubuntu:

sudo apt install ffmpeg imagemagick

Docker

There is a Docker image that comes with deepcomp preinstalled. To use the Docker image, simply pull the latest version from Docker Hub:

``` docker pull stefanbschneider/deepcomp

tag image with just "deepcomp". alternatively, write out "stefanbschneider/deepcomp" in all following commands.

docker tag stefanbschneider/deepcomp:latest deepcomp ```

Alternatively, to build the Docker image manually from the Dockerfile, clone this repository and run docker build -t deepcomp . Use the --no-cache option is to force a rebuild of the image, pulling the latest deepcomp version from PyPI.

Usage

```

get an overview of all options

deepcomp -h ```

For example:

deepcomp --env medium --slow-ues 3 --agent central --workers 2 --train-steps 50000 --seed 42 --video both

To run DeepCoMP, use --alg ppo --agent central. For DD-CoMP, use --alg ppo --agent multi, and for D3-CoMP, use --alg ppo --agent multi --separate-agent-nns.

By default, training logs, results, videos, and trained agents are saved in <project-root>/results, where <project-root> is the root directory of DeepCoMP. If you cloned the repo from GitHub, this is where the Readme is. If you installed via PyPi, this is in your virtualenv's site packages. You can choose a custom location with --result-dir <custom-path>.

Docker

Note: By default, results within the Docker container are not stored persistently. To save them, copy them from the Docker container or use a Docker volume.

Start the Container

If you want to use the deepcomp Docker container and pulled the corresponding image from Docker Hub, you can use it as follows: docker run -d -p 6006:6006 -p 8000:8000 --rm --shm-size=3gb --name deepcomp deepcomp This starts the Docker container in the background, publishing port 6006 for TensorBoard and port 8000 for the HTTP server (described below). The container automatically starts TensorBoard and the HTTP server, so this does not need to be done manually. The --rm flag automatically removes the container once it is stopped. The --shm-size=3gb sets the size of /dev/shm inside the Docker container to 3 GB, which is too small by default.

Use DeepCoMP on the Container

To execute commands on the running Docker container, use docker exec <container-name> <command> as follows: docker exec deepcomp deepcomp <deepcomp-args> Here, the arguments are identical with the ones described above. For example, the following command lists all CLI options: docker exec deepcomp deepcomp -h Or to train the central DeepCoMP agent for a short duration of 4000 steps: docker exec -t deepcomp deepcomp --approach deepcomp --train-steps 4000 --batch-size 200 --ues 2 --result-dir results Important: Specify --result-dir results as argument. Otherwise, the results will be stored elsewhere and TensorFlow and the HTTP server will not find and display them.

The other deepcomp arguments can be set as desired. The Docker -t flag ensures that the output is printed continuously during training, not just after completion.

To inspect training progress or view create files (e.g., rendered videos), use TensorBoard and the HTTP server, which are available via localhost:6006 and localhost:8000.

Terminate the Container

Important: Stopping the container will remove any files and training progress within the container.

Stop the container with docker stop deepcomp

Accessing results remotely

When running remotely, you can serve the replay video by running:

cd results python -m http.server

Then access at <remote-ip>:8000.

Tensorboard

To view learning curves (and other metrics) when training an agent, use Tensorboard:

tensorboard --logdir results/train/ (--host 0.0.0.0)

Tensorboard is available at http://localhost:6006 (or <remote-ip>:6006 when running remotely).

Scaling Up: Running DeepCoMP on multiple cores or a multi-node cluster

To train DeepCoMP on multiple cores in parallel, configure the number of workers (corresponding to CPU cores) with --workers.

To scale training to a multi-node cluster, adjust cluster.yaml and follow the steps described here. Set --workers to the total number of CPU cores you want to use on the entire cluster.

Documentation

API documentation is on https://cn-upb.github.io/DeepCoMP/.

Documentation is generated based on docstrings using pdoc3:

```

from project root

pip install pdoc3 pdoc --force --html --output-dir docs deepcomp

move files to be picked up by GitHub pages

mv docs/deepcomp/ docs/

then manually adjust index.html to link to GitHub repo

```

Contributions

Development: @stefanbschneider

Feature requests, questions, issues, and pull requests via GitHub are welcome.

Acknowledgement

DeepCoMP is an outcome of a joint project between Paderborn University, Germany, and Huawei Germany.

Base station icon (used in rendered videos) by Clea Doltz from the Noun Project.

Owner

  • Name: Computer Networks group @ UPB
  • Login: CN-UPB
  • Kind: organization
  • Location: Paderborn, Germany

Computer Networks Group of Paderborn University

GitHub Events

Total
  • Watch event: 7
  • Fork event: 2
Last Year
  • Watch event: 7
  • Fork event: 2

Committers

Last synced: about 1 year ago

All Time
  • Total Commits: 793
  • Total Committers: 5
  • Avg Commits per committer: 158.6
  • Development Distribution Score (DDS): 0.02
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Stefan Schneider s****r@u****e 777
shubhendra w****h@g****m 6
Stefan Schneider 2****r 5
deepsource-autofix[bot] 6****] 4
stefan s****n@r****e 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 3
  • Total pull requests: 11
  • Average time to close issues: 6 months
  • Average time to close pull requests: about 8 hours
  • Total issue authors: 3
  • Total pull request authors: 3
  • Average comments per issue: 1.67
  • Average comments per pull request: 0.09
  • Merged pull requests: 11
  • Bot issues: 0
  • Bot pull requests: 4
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • fyouly (1)
  • heyshakya (1)
  • stefanbschneider (1)
Pull Request Authors
  • stefanbschneider (6)
  • deepsource-autofix[bot] (4)
  • withshubh (1)
Top Labels
Issue Labels
documentation (1) enhancement (1) good first issue (1) wontfix (1) bug (1) question (1)
Pull Request Labels

Packages

  • Total packages: 3
  • Total downloads:
    • pypi 83 last-month
  • Total dependent packages: 0
    (may contain duplicates)
  • Total dependent repositories: 1
    (may contain duplicates)
  • Total versions: 37
  • Total maintainers: 1
proxy.golang.org: github.com/cn-upb/deepcomp
  • Versions: 12
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.4%
Average: 5.6%
Dependent repos count: 5.8%
Last synced: 6 months ago
proxy.golang.org: github.com/CN-UPB/DeepCoMP
  • Versions: 12
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.4%
Average: 5.6%
Dependent repos count: 5.8%
Last synced: 6 months ago
pypi.org: deepcomp

DeepCoMP: Self-Learning Dynamic Multi-Cell Selection for Coordinated Multipoint (CoMP)

  • Versions: 13
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 83 Last month
Rankings
Dependent packages count: 10.1%
Stargazers count: 10.3%
Forks count: 11.4%
Average: 14.6%
Downloads: 19.6%
Dependent repos count: 21.6%
Maintainers (1)
Last synced: 6 months ago

Dependencies

.github/workflows/docker-publish.yml actions
  • actions/checkout v2 composite
  • docker/build-push-action v1 composite
.github/workflows/python-publish.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
.github/workflows/python-test.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
Dockerfile docker
  • ubuntu focal build
setup.py pypi