facebookresearch / facebookresearch/detectron2

Allow `utils.comm` to use custom backend

Open
#2,218 3 comments 0 reactions 0 assignees View on GitHub
contributions welcome enhancement
Dominant language
Python
Stars
34.7k
Forks
7.9k
PR merge metrics
No merged PRs in 30d

Description

## 🚀 Feature

Third-party backends other than `torch.distributed` shall be allowed if users set it. This may enable training with torchelastic, apex or horovod.

## Motivation & Examples
```python
# my_comm_module.py:
# define a few necessary functions
def get_rank():
...
def ...

```

```python
detectron2.utils.comm.set_backend(my_comm_module)
# do other stuff as usual ..
```

## Note

Exact interface (e.g. what functions are required in custom backend) to be determined.

Contributor guide

Open the contributing guide

Research direction

Start by reading the detectron2.utils.comm entry point and trace its current torch.distributed usage. Define which functions a custom backend must provide and how set_backend should affect existing communication calls; the issue is complete when a user-supplied backend can replace torch.distributed for the supported operations.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
distributed-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.