This folder is a collection of utility scripts, listed and explained below.
All scripts need to be run in the root path of project, unless otherwise noted.
Generating benchmark by collecting results from configs folder. Usage:
python ./scripts/gen_benchmark.pyIt will generate a markdown file, named as benchmark_results.md.
Making wheel package of mindcv and sha256sum of the wheel files. Usage:
./scripts/package.shNew! Just simply run the following command to make the wheel:
python -m buildA simple clean launcher for distributed training on Ascend.
Following instruction from Mindspore,
except launching distributed training with msrun, we can also use multiprocess
with multi-card networking configuration rank_table.json to manually start a process on each card.
To get rank_table.json on your machine, try the hccl tools from here.
After you get the
rank_table.json, replace the"/path/to/rank_table.json"inlaunch_dist.shwith the actual path.
Now, you can replace your standalone launching with distributed launching:
- python script.py --arg1=value1 --arg2=value2
+ ./scripts/launch_dist.sh script.py --arg1=value1 --arg2=value2where --arg* are arguments of script.py.
For example:
./scripts/launch_dist.sh train.py --config=configs/resnet/resnet_50_ascend.yaml --data_dir=/my/awesome/datasetNote: Don't forget to check the argument
--distributeif you are usingtrain.pyortrain_with_func.py!
For anyone who hates shell scripts, we offer python scripts launch_dist.py as well. Both are used in the same way!