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

Enable IC runs w/ torchrun #1784

Merged
merged 1 commit into from
Oct 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions src/sparseml/pytorch/torchvision/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ def collate_fn(batch):
)

_LOGGER.info("Creating model")
local_rank = args.local_rank if args.distributed else None
local_rank = int(os.environ["LOCAL_RANK"]) if args.distributed else None
model, arch_key, maybe_dp_device = _create_model(
arch_key=args.arch_key,
local_rank=local_rank,
Expand Down Expand Up @@ -1256,14 +1256,6 @@ def new_func(*args, **kwargs):
"Note: Will use ImageNet values if not specified."
),
)
@click.option(
"--local_rank",
"--local-rank",
type=int,
default=None,
help="Local rank for distributed training",
hidden=True, # should not be modified by user
)
@click.pass_context
def cli(ctx, **kwargs):
"""
Expand Down
Loading