Code Monkey home page Code Monkey logo

Comments (3)

fzohra avatar fzohra commented on June 12, 2024 2

Turns out that this issue was a result of os.environ['LOCAL_SIZE'] not being set so the local_size variable used by the NodeSplitSampler was incorrectly defaulting to 1. The variable LOCAL_SIZE doesn't appear to be a standard environment variable used in PyTorch's distributed package, is it?

Setting LOCAL_SIZE to the number of GPUs on a single node resolves the issue.

In which case, given 8 gpus on a single node, are these variables in the NodeSplitSampler expected:

world_size=8
local_size=8
node_size=1
node_idx=0
rank=GPU rank (0-7)
local_rank=GPU rank (0-7)

In doing so, am I right in understanding that the expected behavior of get_index_on_node is to assign all 10 of the composite files (0-9) for each dataset to the single node. And the expected behavior ofget_index_on_rank is to split the full dataset by indices between the 8 gpus.

from pytorch_empirical-mvm.

tsujuifu avatar tsujuifu commented on June 12, 2024 1

Thanks for pointing this out!

The distributed variables will be set automatically in our training environment, so I missed that part in this release code πŸ˜….

from pytorch_empirical-mvm.

tsujuifu avatar tsujuifu commented on June 12, 2024

It should work after adding LOCAL_SIZE='8'.
I also update the command in README.

Super thanks again for your clarification 😍

from pytorch_empirical-mvm.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.