pytorch / pytorch/vision

Classification references does not work without distributed setup

Open
#6,529 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug help wanted module: reference scripts
Dominant language
Python
Stars
17.9k
Forks
7.3k
Avg merge
1d 15h
Merged PRs (30d)
13

Description

If you don't set the respective env vars

https://github.com/pytorch/vision/blob/d5bd8b728f14c33b339fc45c90ca39be339bce3f/references/classification/utils.py#L255-L258

training will not be distributed and in turn the backend will not be initialized. However, during evaluation we check

https://github.com/pytorch/vision/blob/d5bd8b728f14c33b339fc45c90ca39be339bce3f/references/classification/train.py#L88

unguarded, which then fails with

RuntimeError: Default process group has not been initialized, please make sure to call init_process_group.

cc @datumbox

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with references/classification/utils.py at the environment-variable handling and references/classification/train.py at the evaluation check linked in the issue. Reproduce classification training without the distributed environment variables and confirm the evaluation path no longer raises the uninitialized process-group error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
computer-vision, distributed-systems
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.