Skip to content

How to run python library module as a script: "python -m"  #358

@JooPoo

Description

@JooPoo

Hi,

I would like to use torch.distributed.launch to launch my script. For example, the following script from github:maskrcnn-benchmark:

python -m torch.distributed.launch --nproc_per_node=4 /path_to_maskrcnn_benchmark/tools/train_net.py --config-file "path/to/config/file.yaml"

script_params can only pass parameters to train_net.py, but how can I pass "-m torch.distributed.launch --nproc_per_node=4" to python?


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions