-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #44 from moskomule/dev
2020.12 update
- Loading branch information
Showing
29 changed files
with
672 additions
and
760 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: publish to pypi | ||
|
||
on: push | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: Install dependencies | ||
run: pip install -U setuptools wheel | ||
|
||
- name: Build and tar | ||
run: python setup.py sdist bdist_wheel | ||
|
||
- name: Publish distribution to PyPI | ||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | ||
uses: pypa/gh-action-pypi-publish@master | ||
with: | ||
password: ${{ secrets.pypi_password }} | ||
|
||
- name: Publish distribution to Test PyPI | ||
uses: pypa/gh-action-pypi-publish@master | ||
with: | ||
password: ${{ secrets.test_pypi_password }} | ||
repository_url: https://test.pypi.org/legacy/ | ||
skip_existing: true |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Examples | ||
|
||
## Requirements | ||
|
||
* `homura` | ||
* `chika` by `pip install -U chika` | ||
|
||
## Contents | ||
|
||
* [cifar10.py](examples/cifar10.py): training ResNet-20 or WideResNet-28-10 with random crop on CIFAR10 | ||
* [imagenet.py](examples/imagenet.py): training a CNN on ImageNet on multi GPUs (single and multi process) | ||
|
||
Note that homura expects datasets are downloaded in `~/.torch/data/DATASET_NAME`. | ||
|
||
For [imagenet.py](examples/imagenet.py), if you want | ||
|
||
* single node single gpu | ||
* single node multi gpus | ||
|
||
run `python imagenet.py`. | ||
|
||
If you want | ||
|
||
* single node multi threads multi gpus | ||
|
||
run `python -m torch.distributed.launch --nproc_per_node=$NUM_GPUS imagenet.py [...]`. | ||
|
||
If you want | ||
|
||
* multi nodes multi threads multi gpus, | ||
|
||
run | ||
|
||
* `python -m torch.distributed.launch --nnodes=$NUM_NODES --node_rank=0 --master_addr=$MASTER_IP --master_port=$MASTER_PORT --nproc_per_node=$NUM_GPUS imagenet.py` | ||
on the master node | ||
* `python -m torch.distributed.launch --nnodes=$NUM_NODES --node_rank=$RANK --master_addr=$MASTER_IP --master_port=$MASTER_PORT --nproc_per_node=$NUM_GPUS imagenet.py` | ||
on the other nodes | ||
|
||
Here, `0<$RANK<$NUM_NODES`. |
Oops, something went wrong.