Skip to content

fix: bump epochs batch size to larger ones, update READMEs #155

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

Merged
merged 4 commits into from
Jun 7, 2021
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
1 change: 1 addition & 0 deletions scripts/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ image_dataset_viz
pytest
transformers
datasets
tensorboard
32 changes: 28 additions & 4 deletions scripts/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,13 @@ run_simple() {
for dir in $(find ./dist-tests/*-simple -type d)
do
cd $dir
python main.py --data_path ~/data
python main.py --data_path ~/data \
--train_batch_size 4 \
--eval_batch_size 4 \
--num_workers 2 \
--max_epochs 2 \
--train_epoch_length 4 \
--eval_epoch_length 4
cd $CWD
done
}
Expand All @@ -28,7 +34,13 @@ run_all() {
do
cd $dir
pytest -vra --color=yes --tb=short test_*.py
python main.py --data_path ~/data
python main.py --data_path ~/data \
--train_batch_size 4 \
--eval_batch_size 4 \
--num_workers 2 \
--max_epochs 2 \
--train_epoch_length 4 \
--eval_epoch_length 4
cd $CWD
done
}
Expand All @@ -39,7 +51,13 @@ run_launch() {
cd $dir
python -m torch.distributed.launch \
--nproc_per_node 2 --use_env \
main.py --backend gloo --data_path ~/data
main.py --backend gloo --data_path ~/data \
--train_batch_size 4 \
--eval_batch_size 4 \
--num_workers 2 \
--max_epochs 2 \
--train_epoch_length 4 \
--eval_epoch_length 4
cd $CWD
done
}
Expand All @@ -49,7 +67,13 @@ run_spawn() {
do
cd $dir
python main.py --data_path ~/data \
--nproc_per_node 2 --backend gloo
--nproc_per_node 2 --backend gloo \
--train_batch_size 4 \
--eval_batch_size 4 \
--num_workers 2 \
--max_epochs 2 \
--train_epoch_length 4 \
--eval_epoch_length 4
cd $CWD
done
}
Expand Down
12 changes: 6 additions & 6 deletions src/templates/template-common/config.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
seed: 666
data_path: ./
train_batch_size: 4
eval_batch_size: 4
num_workers: 2
max_epochs: 2
train_epoch_length: 4
eval_epoch_length: 4
train_batch_size: 32
eval_batch_size: 32
num_workers: 4
max_epochs: 20
train_epoch_length: 1000
eval_epoch_length: 1000
use_amp: false
debug: false

Expand Down
6 changes: 5 additions & 1 deletion src/templates/template-text-classification/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Template by Code-Generator
[![Code-Generator](https://badgen.net/badge/Template%20by/Code-Generator/ee4c2c?labelColor=eaa700)](https://github.com/pytorch-ignite/code-generator)

# Text Classification Template

This is the text classification template by Code-Generator using `bert-base-uncased` model from HuggingFace Transformers and `imdb` dataset from HuggingFace datasets and training is powered by PyTorch and PyTorch-Ignite.

## Getting Started

Expand Down
12 changes: 6 additions & 6 deletions src/templates/template-text-classification/config.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
seed: 666
data_path: ./
train_batch_size: 4
eval_batch_size: 4
num_workers: 2
max_epochs: 2
train_epoch_length: 4
eval_epoch_length: 4
train_batch_size: 32
eval_batch_size: 32
num_workers: 4
max_epochs: 20
train_epoch_length: 1000
eval_epoch_length: 1000
use_amp: false
debug: false
model: bert-base-uncased
Expand Down
6 changes: 5 additions & 1 deletion src/templates/template-vision-classification/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Template by Code-Generator
[![Code-Generator](https://badgen.net/badge/Template%20by/Code-Generator/ee4c2c?labelColor=eaa700)](https://github.com/pytorch-ignite/code-generator)

# Image Classification Template by Code-Generator

This is the image classification template by Code-Generator using `resnet18` model and `cifar10` dataset from TorchVision and training is powered by PyTorch and PyTorch-Ignite.

## Getting Started

Expand Down
12 changes: 6 additions & 6 deletions src/templates/template-vision-classification/config.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
seed: 666
data_path: ./
train_batch_size: 4
eval_batch_size: 4
num_workers: 2
max_epochs: 2
train_epoch_length: 4
eval_epoch_length: 4
train_batch_size: 32
eval_batch_size: 32
num_workers: 4
max_epochs: 20
train_epoch_length: 1000
eval_epoch_length: 1000
lr: 0.0001
use_amp: false
debug: false
Expand Down
6 changes: 5 additions & 1 deletion src/templates/template-vision-dcgan/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Template by Code-Generator
[![Code-Generator](https://badgen.net/badge/Template%20by/Code-Generator/ee4c2c?labelColor=eaa700)](https://github.com/pytorch-ignite/code-generator)

# DCGAN Template

This is the dcgan template by Code-Generator using `dcgan` model and `cifar10` dataset from TorchVision and training is powered by PyTorch and PyTorch-Ignite.

## Getting Started

Expand Down
12 changes: 6 additions & 6 deletions src/templates/template-vision-dcgan/config.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
seed: 666
data_path: ./
train_batch_size: 4
eval_batch_size: 4
num_workers: 2
max_epochs: 2
train_epoch_length: 4
eval_epoch_length: 4
train_batch_size: 32
eval_batch_size: 32
num_workers: 4
max_epochs: 20
train_epoch_length: 1000
eval_epoch_length: 1000
lr: 0.0001
use_amp: false
debug: false
Expand Down
6 changes: 5 additions & 1 deletion src/templates/template-vision-segmentation/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Template by Code-Generator
[![Code-Generator](https://badgen.net/badge/Template%20by/Code-Generator/ee4c2c?labelColor=eaa700)](https://github.com/pytorch-ignite/code-generator)

# Segmentation Template

This is the segmentation template by Code-Generator using `deeplabv3_resnet101` and `cifar10` dataset from TorchVision and training is powered by PyTorch and PyTorch-Ignite.

## Getting Started

Expand Down
12 changes: 6 additions & 6 deletions src/templates/template-vision-segmentation/config.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
seed: 666
data_path: ./
train_batch_size: 4
eval_batch_size: 4
num_workers: 2
max_epochs: 2
train_epoch_length: 4
eval_epoch_length: 4
train_batch_size: 32
eval_batch_size: 32
num_workers: 4
max_epochs: 20
train_epoch_length: 1000
eval_epoch_length: 1000
lr: 0.007
use_amp: false
debug: false
Expand Down