Skip to content
Merged
Show file tree
Hide file tree
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
22 changes: 11 additions & 11 deletions .github/pr-labeler-config.yml
Original file line number Diff line number Diff line change
@@ -1,55 +1,55 @@
# Add 'docker' to any changes within 'docker' folder or any subfolders
docker:
- changed-files:
- any-glob-to-any-file: docker/**
- any-glob-to-any-file: docker/**

# Add 'docs' to any changes within 'docs' folder
docs:
- changed-files:
- any-glob-to-any-file: docs/**
- any-glob-to-any-file: docs/**

# Add 'ci' to any changes in '.github' folder
ci:
- changed-files:
- any-glob-to-any-file: .github/**
- any-glob-to-any-file: .github/**

# Add 'examples' to any changes within 'examples' folder
examples:
- changed-files:
- any-glob-to-any-file: examples/**
- any-glob-to-any-file: examples/**

# Add 'base' to any changes within 'base' folder
"module: base":
- changed-files:
- any-glob-to-any-file: ignite/base/**/*
- any-glob-to-any-file: ignite/base/**/*

# Add 'contrib' to any changes within 'contrib' folder
"module: contrib":
- changed-files:
- any-glob-to-any-file: ignite/contrib/**/*
- any-glob-to-any-file: ignite/contrib/**/*

# Add 'distributed' to any changes within 'distributed' folder
"module: distributed":
- changed-files:
- any-glob-to-any-file: ignite/distributed/**/*
- any-glob-to-any-file: ignite/distributed/**/*

# Add 'engine' to any changes within 'engine' folder
"module: engine":
- changed-files:
- any-glob-to-any-file: ignite/engine/**/*
- any-glob-to-any-file: ignite/engine/**/*

# Add 'handlers' to any changes within 'handlers' folder
"module: handlers":
- changed-files:
- any-glob-to-any-file: ignite/handlers/**/*
- any-glob-to-any-file: ignite/handlers/**/*

# Add 'metrics' to any changes within 'metrics' folder
"module: metrics":
- changed-files:
- any-glob-to-any-file: ignite/metrics/**/*
- any-glob-to-any-file: ignite/metrics/**/*

-
# Add 'utils' to any changes within 'utils' module
"module: utils":
- changed-files:
- any-glob-to-any-file: ignite/utils.py
- any-glob-to-any-file: ignite/utils.py
4 changes: 1 addition & 3 deletions .github/workflows/discord_issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
workflow_dispatch:
inputs:
issue_number:
description: 'Issue number'
description: "Issue number"
required: true

permissions:
Expand All @@ -26,5 +26,3 @@ jobs:
issue_number: ${{ github.event.inputs.issue_number || github.event.issue.number }}
issue_comment: Hey 👋, I've just created a [thread]($THREAD_LINK$) for this issue on [PyTorch-Ignite Discord](https://pytorch-ignite.ai/chat) where you can quickly talk to the community on the topic.
discord_message: New issue created in `${{ github.repository }}`:<https://github.com/${{ github.repository }}/issues/${{ github.event.issue.number }}>


2 changes: 1 addition & 1 deletion .github/workflows/discord_pull_requests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
workflow_dispatch:
inputs:
pull_request_number:
description: 'Pull request number'
description: "Pull request number"
required: true

permissions:
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,12 @@ on:
types: [published]
workflow_dispatch:


concurrency:
# <workflow_name>-<branch_name>-<true || commit_sha (if branch is protected)>
group: docker-build-publish-${{ github.ref_name }}-${{ !(github.ref_protected) || github.sha }}
cancel-in-progress: true

jobs:

setup:
name: Setup
runs-on: ubuntu-latest
Expand Down Expand Up @@ -46,7 +44,6 @@ jobs:
echo "pth_version=$(python -c "import configparser; cfg=configparser.ConfigParser(); cfg.read('docker.cfg'); print(cfg.get('DEFAULT', 'build_docker_image_pytorch_version'))")" >> $GITHUB_OUTPUT
echo "hvd_version=$(python -c "import configparser; cfg=configparser.ConfigParser(); cfg.read('docker.cfg'); print(cfg.get('DEFAULT', 'build_docker_image_hvd_version'))")" >> $GITHUB_OUTPUT


build-hvd:
name: Build all Horovod flavoured PyTorch-Ignite images
needs: setup
Expand Down Expand Up @@ -106,7 +103,6 @@ jobs:
bash push_all.sh hvd-vision
bash push_all.sh hvd-nlp


build-hvd-apex:
name: Build all Horovod + Apex flavoured PyTorch-Ignite images
needs: setup
Expand Down Expand Up @@ -166,7 +162,6 @@ jobs:
bash push_all.sh hvd-apex-vision
bash push_all.sh hvd-apex-nlp


build-main:
name: Build all PyTorch-Ignite images
needs: setup
Expand Down Expand Up @@ -226,7 +221,6 @@ jobs:
bash push_all.sh vision
bash push_all.sh nlp


build-main-apex:
name: Build all PyTorch-Ignite images with Apex
needs: setup
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/pytorch-version-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ jobs:
fail-fast: false
matrix:
python-version: [3.9, "3.10", "3.11"]
pytorch-version:
[2.5.1, 2.4.1, 2.3.1, 2.2.2, 1.13.1, 1.12.1, 1.10.0]
pytorch-version: [2.5.1, 2.4.1, 2.3.1, 2.2.2, 1.13.1, 1.12.1, 1.10.0]
exclude:
- pytorch-version: 1.10.0
python-version: "3.10"
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/triage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ jobs:
with:
configuration-path: .github/pr-labeler-config.yml
repo-token: "${{ secrets.GITHUB_TOKEN }}"

# Turned off due to unexpected behavior on issue opening+labeling? https://github.com/pytorch/ignite/issues/1836
# - name: Welcome
# uses: actions/first-interaction@v1
Expand Down
1 change: 1 addition & 0 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ Available Tensor Operations:
- `docker pull pytorchignite/hvd-apex-nlp:latest`

**Deprecated images** (no version updates)

- [msdp/Dockerfile.msdp-apex-base](msdp/Dockerfile.msdp-apex): multi-stage MSDeepSpeed build with latest Pytorch, Ignite image with minimal dependencies
- `docker pull pytorchignite/msdp-apex:latest`
- [msdp/Dockerfile.msdp-apex-vision](msdp/Dockerfile.msdp-apex-vision): base MSDeepSpeed build with useful computer vision libraries
Expand Down
2 changes: 0 additions & 2 deletions examples/mnist/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ python mnist.py

Same example with logging using TQDM progress bar


```bash
python mnist_with_tqdm_logger.py
```
Expand All @@ -30,7 +29,6 @@ MNIST example with training and validation monitoring using Tensorboard

- Tensorboard: `pip install tensorboard`


Run the example:

```bash
Expand Down
10 changes: 6 additions & 4 deletions examples/references/classification/imagenet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ Features:
| --------- | ----------------------- | ----------------------- | ------------------- | ------------------- |
| ResNet-50 | 78% | 92% | 77% | 94% |

Experiment | Model | Training Top-1 Accuracy | Training Top-5 Accuracy | Test Top-1 Accuracy | Test Top-5 Accuracy | ClearML Link
---|---|---|---|---|---|---
configs/???.py |
| Experiment | Model | Training Top-1 Accuracy | Training Top-5 Accuracy | Test Top-1 Accuracy | Test Top-5 Accuracy | ClearML Link |
| -------------- | ----- | ----------------------- | ----------------------- | ------------------- | ------------------- | ------------ |
| configs/???.py |

## Setup

Expand All @@ -25,6 +25,7 @@ pip install -r requirements.txt
### Docker

For docker users, you can use the following images to run the example:

```bash
docker pull pytorchignite/vision:latest
```
Expand All @@ -47,9 +48,11 @@ export DATASET_PATH=/path/to/imagenet
- Adjust batch size for your GPU type in the configuration file: `configs/baseline_resnet50.py` or `configs/baseline_resnet50.py`

Run the following command:

```bash
CUDA_VISIBLE_DEVICES=0 python -u main.py training configs/baseline_resnet50.py
```

#### Multiple GPUs

- Adjust total batch size for your GPUs in the configuration file: `configs/baseline_resnet50.py` or `configs/baseline_resnet50.py`
Expand All @@ -58,7 +61,6 @@ CUDA_VISIBLE_DEVICES=0 python -u main.py training configs/baseline_resnet50.py
OMP_NUM_THREADS=1 torchrun --nproc_per_node=2 main.py training configs/baseline_resnet50.py
```


## Acknowledgements

Trainings were done using credits provided by [trainml.ai](trainml.ai) platform.
15 changes: 8 additions & 7 deletions examples/references/segmentation/pascal_voc2012/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@ Features:
- Distributed training with native automatic mixed precision
- Experiments tracking with [ClearML](https://github.com/allegroai/clearml)

Experiment | Model | Dataset | Val Avg IoU | ClearML Link
---|---|---|---|---
configs/baseline_dplv3_resnet101.py | DeepLabV3 Resnet101 | VOC Only | 0.659161 | [link](https://app.clear.ml/projects/0e9a3a92d3134283b7d5572d516d60c5/experiments/a7254f084a9e47ca9380dfd739f89520/output/execution)
configs/baseline_dplv3_resnet101_sbd.py | DeepLabV3 Resnet101 | VOC+SBD | 0.6853087 | [link](https://app.clear.ml/projects/0e9a3a92d3134283b7d5572d516d60c5/experiments/dc4cee3377a74d19bc2d0e0e4d638c1f/output/execution)

| Experiment | Model | Dataset | Val Avg IoU | ClearML Link |
| --------------------------------------- | ------------------- | -------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| configs/baseline_dplv3_resnet101.py | DeepLabV3 Resnet101 | VOC Only | 0.659161 | [link](https://app.clear.ml/projects/0e9a3a92d3134283b7d5572d516d60c5/experiments/a7254f084a9e47ca9380dfd739f89520/output/execution) |
| configs/baseline_dplv3_resnet101_sbd.py | DeepLabV3 Resnet101 | VOC+SBD | 0.6853087 | [link](https://app.clear.ml/projects/0e9a3a92d3134283b7d5572d516d60c5/experiments/dc4cee3377a74d19bc2d0e0e4d638c1f/output/execution) |

## Setup

Expand All @@ -23,10 +22,13 @@ pip install -r requirements.txt
### Docker

For docker users, you can use the following images to run the example:

```bash
docker pull pytorchignite/vision:latest
```

or

```bash
docker pull pytorchignite/hvd-vision:latest
```
Expand All @@ -51,7 +53,6 @@ This script will download and extract the following datasets into `/path/to/data
- The [Pascal VOC2012](http://host.robots.ox.ac.uk/pascal/VOC/voc2012/VOCtrainval_11-May-2012.tar) dataset
- Optionally, the [SBD](http://www.eecs.berkeley.edu/Research/Projects/CS/vision/grouping/semantic_contours/benchmark.tgz) evaluation dataset


## Usage

Please, export the `DATASET_PATH` environment variable for the Pascal VOC2012 dataset.
Expand All @@ -75,6 +76,7 @@ export SBD_DATASET_PATH=/path/to/SBD/
- Adjust batch size for your GPU type in the configuration file: `configs/baseline_dplv3_resnet101_sbd.py` or `configs/baseline_dplv3_resnet101.py`

Run the following command:

```bash
CUDA_VISIBLE_DEVICES=0 python -u main.py training configs/baseline_dplv3_resnet101_sbd.py
# or without SBD
Expand Down Expand Up @@ -121,7 +123,6 @@ torchrun --nproc_per_node=2 main.py eval configs/eval_baseline_dplv3_resnet101_s
horovodrun -np=2 python -u main.py eval configs/eval_baseline_dplv3_resnet101_sbd.py --backend="horovod"
```


## Acknowledgements

Trainings were done using credits provided by AWS for open-source development via NumFOCUS
Expand Down
8 changes: 5 additions & 3 deletions examples/super_resolution/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,11 @@ This example trains a super-resolution network on the [Caltech101 dataset](https
### Super-resolve example on a Cifar-10 image

#### Input Image

![Cifar input image](./images/input_cifar.png)

#### Output Images
| Output image from Model | Output from bicubic sampling |
|-------------------------------|------------------------------------|
| ![Cifar output image](./images/out_cifar.png) | ![Cifar output from bicubic sampling](./images/bicubic_image_cifar.png)|

| Output image from Model | Output from bicubic sampling |
| --------------------------------------------- | ----------------------------------------------------------------------- |
| ![Cifar output image](./images/out_cifar.png) | ![Cifar output from bicubic sampling](./images/bicubic_image_cifar.png) |
5 changes: 3 additions & 2 deletions examples/transformers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,24 +32,24 @@ Run the example on a single GPU:
```bash
python main.py run
```

If needed, please, adjust the batch size to your GPU device with `--batch_size` argument.

The default model is `bert-base-uncased` incase you need to change that use the `--model` argument, for details on which models can be used refer [here](https://huggingface.co/transformers/v3.0.2/model_doc/auto.html#automodelforsequenceclassification)

Example:

```bash
#Using DistilBERT which has 40% less parameters than bert-base-uncased
python main.py run --model="distilbert-base-uncased"
```


For details on accepted arguments:

```bash
python main.py run -- --help
```


### Distributed training

#### Single node, multiple GPUs
Expand Down Expand Up @@ -93,6 +93,7 @@ python -u main.py run --backend="horovod" --nproc_per_node=2
import os
assert os.environ['COLAB_TPU_ADDR'], 'Make sure to select TPU from Edit > Notebook settings > Hardware accelerator'
```

```bash
VERSION = "nightly"
!curl -q https://raw.githubusercontent.com/pytorch/xla/master/contrib/scripts/env-setup.py -o pytorch-xla-env-setup.py
Expand Down