Skip to content

Commit

Permalink
20.07 update (#879)
Browse files Browse the repository at this point in the history
* 20.07 update

* 20.07 update

* 20.07 update
  • Loading branch information
Scitator authored Jul 6, 2020
1 parent 4176e01 commit 985f32b
Show file tree
Hide file tree
Showing 23 changed files with 77 additions and 80 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/dl_cpu_core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches:
- master
- develop
pull_request:
branches:
- develop
Expand All @@ -19,19 +18,20 @@ jobs:
fail-fast: false
# max-parallel: 6
matrix:
os: [ubuntu-18.04] # , macOS-10.15] # windows-2019,
python-version: [3.6] # , 3.7, 3.8]
os: [ubuntu-18.04, macOS-10.15] # windows-2019,
python-version: [3.6, 3.7, 3.8]
requirements: ['minimal', 'latest']
exclude:
# pypi problems
- python-version: 3.8
requirements: 'minimal'
# pypi problems 2
- python-version: 3.7
requirements: 'minimal'
# pickle problems
- python-version: 3.8
os: macOS-10.15
- python-version: 3.6
os: macOS-10.15

timeout-minutes: 30
steps:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/dl_cpu_cv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches:
- master
- develop
pull_request:
branches:
- develop
Expand All @@ -19,19 +18,20 @@ jobs:
fail-fast: false
# max-parallel: 6
matrix:
os: [ubuntu-18.04] # , macOS-10.15] # windows-2019,
python-version: [3.6] # , 3.7, 3.8]
os: [ubuntu-18.04, macOS-10.15] # windows-2019,
python-version: [3.6, 3.7, 3.8]
requirements: ['minimal', 'latest']
exclude:
# pypi problems
- python-version: 3.8
requirements: 'minimal'
# pypi problems 2
- python-version: 3.7
requirements: 'minimal'
# pickle problems
- python-version: 3.8
os: macOS-10.15
- python-version: 3.6
os: macOS-10.15

timeout-minutes: 30
steps:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/dl_cpu_nlp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches:
- master
- develop
pull_request:
branches:
- develop
Expand All @@ -19,19 +18,20 @@ jobs:
fail-fast: false
# max-parallel: 6
matrix:
os: [ubuntu-18.04] # , macOS-10.15] # windows-2019,
python-version: [3.6] # , 3.7, 3.8]
os: [ubuntu-18.04, macOS-10.15] # windows-2019,
python-version: [3.6, 3.7, 3.8]
requirements: ['minimal', 'latest']
exclude:
# pypi problems
- python-version: 3.8
requirements: 'minimal'
# pypi problems 2
- python-version: 3.7
requirements: 'minimal'
# pickle problems
- python-version: 3.8
os: macOS-10.15
- python-version: 3.6
os: macOS-10.15

timeout-minutes: 30
steps:
Expand Down
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@
![catalyst-cv](https://github.com/catalyst-team/catalyst/workflows/catalyst-cv/badge.svg?branch=master&event=push)
![catalyst-nlp](https://github.com/catalyst-team/catalyst/workflows/catalyst-nlp/badge.svg?branch=master&event=push)
[![Build Status](http://66.248.205.49:8111/app/rest/builds/buildType:id:Catalyst_Deploy/statusIcon.svg)](http://66.248.205.49:8111/project.html?projectId=Catalyst&tab=projectOverview&guest=1)

[![python](https://img.shields.io/badge/python_3.6-passing-success)](https://github.com/catalyst-team/catalyst/workflows/catalyst/badge.svg?branch=master&event=push)
[![python](https://img.shields.io/badge/python_3.7-passing-success)](https://github.com/catalyst-team/catalyst/workflows/catalyst/badge.svg?branch=master&event=push)
[![python](https://img.shields.io/badge/python_3.8-passing-success)](https://github.com/catalyst-team/catalyst/workflows/catalyst/badge.svg?branch=master&event=push)

[![os](https://img.shields.io/badge/Linux-passing-success)](https://github.com/catalyst-team/catalyst/workflows/catalyst/badge.svg?branch=master&event=push)
[![os](https://img.shields.io/badge/OSX-passing-success)](https://github.com/catalyst-team/catalyst/workflows/catalyst/badge.svg?branch=master&event=push)
[![os](https://img.shields.io/badge/WSL-passing-success)](https://github.com/catalyst-team/catalyst/workflows/catalyst/badge.svg?branch=master&event=push)
</div>

PyTorch framework for Deep Learning research and development.
Expand Down Expand Up @@ -161,7 +169,8 @@ pip install git+https://github.com/catalyst-team/catalyst@master --upgrade
</p>
</details>

Catalyst is compatible with: Python 3.6+. PyTorch 1.0.0+.
Catalyst is compatible with: Python 3.6+. PyTorch 1.1+. <br/>
Tested on Ubuntu 16.04/18.04/20.04, macOS 10.15, Windows 10 and Windows Subsystem for Linux.


### Minimal Examples
Expand Down Expand Up @@ -799,6 +808,7 @@ best practices for your deep learning research.
### Docs

- [master](https://catalyst-team.github.io/catalyst/)
- [20.07](https://catalyst-team.github.io/catalyst/v20.07/index.html)
- [20.06](https://catalyst-team.github.io/catalyst/v20.06/index.html)
- [20.05](https://catalyst-team.github.io/catalyst/v20.05/index.html), [20.05.1](https://catalyst-team.github.io/catalyst/v20.05.1/index.html)
- [20.04](https://catalyst-team.github.io/catalyst/v20.04/index.html), [20.04.1](https://catalyst-team.github.io/catalyst/v20.04.1/index.html), [20.04.2](https://catalyst-team.github.io/catalyst/v20.04.2/index.html)
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions teamcity/dl_cpu.sh → bin/teamcity/dl_cpu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
set -eo pipefail -v


bash ./teamcity/dl_.sh
# bash ./teamcity/dl_apex.sh
bash ./bin/teamcity/dl_.sh
# bash ./bin/teamcity/dl_apex.sh

################################### CPU ######################################
USE_APEX="0" CUDA_VISIBLE_DEVICES="" bash ./bin/tests/check_dl_all.sh
4 changes: 2 additions & 2 deletions teamcity/dl_gpu.sh → bin/teamcity/dl_gpu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
set -eo pipefail -v


bash ./teamcity/dl_.sh
bash ./teamcity/dl_apex.sh
bash ./bin/teamcity/dl_.sh
bash ./bin/teamcity/dl_apex.sh

################################### GPU ######################################
USE_APEX="0" CUDA_VISIBLE_DEVICES="0" bash ./bin/tests/check_dl_all.sh
Expand Down
4 changes: 2 additions & 2 deletions teamcity/dl_gpu2.sh → bin/teamcity/dl_gpu2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
set -eo pipefail -v


bash ./teamcity/dl_.sh
bash ./teamcity/dl_apex.sh
bash ./bin/teamcity/dl_.sh
bash ./bin/teamcity/dl_apex.sh

################################### GPU2 ####################################
USE_APEX="0" USE_DDP="0" CUDA_VISIBLE_DEVICES="0,1" \
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 0 additions & 2 deletions bin/tests/check_dl_core_.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ rm -rf ./tests/logs


################################ pipeline 01 ################################
# imports check
# (set -e; for f in tests/_tests_scripts/*.py; do PYTHONPATH=./catalyst:${PYTHONPATH} python "$f"; done)
(set -e; for f in tests/_tests_scripts/core_*.py; do PYTHONPATH=./catalyst:${PYTHONPATH} python "$f"; done)
(set -e; for f in tests/_tests_scripts/dl_*.py; do PYTHONPATH=./catalyst:${PYTHONPATH} python "$f"; done)

Expand Down
50 changes: 25 additions & 25 deletions bin/tests/check_dl_core_callbacks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -728,30 +728,30 @@ rm -rf ./tests/logs/_tests_dl_callbacks ${EXP_OUTPUT}

################################ pipeline 20 ################################
# testing loading from checkpoint specified by path in combination with other
LOG_MSG='pipeline 20'
echo ${LOG_MSG}

LOGDIR=./tests/logs/_tests_dl_callbacks/trace
CHECKPOINTS=${LOGDIR}/checkpoints
TRACE=${LOGDIR}/trace
LOGFILE=${CHECKPOINTS}/_metrics.json

PYTHONPATH=./examples:./catalyst:${PYTHONPATH} \
python catalyst/dl/scripts/run.py \
--expdir=${EXPDIR} \
--config=${EXPDIR}/config20.yml \
--logdir=${LOGDIR} > ${EXP_OUTPUT}

cat ${EXP_OUTPUT}

check_file_existence ${LOGFILE}
cat ${LOGFILE}
echo ${LOG_MSG}

check_checkpoints "${CHECKPOINTS}/best" 1
check_checkpoints "${CHECKPOINTS}/last" 1
check_checkpoints "${CHECKPOINTS}/stage1\.[[:digit:]]" 1
check_num_files ${CHECKPOINTS} 7 # 3x2 checkpoints + _metrics.json
check_num_files ${TRACE} 1
#LOG_MSG='pipeline 20'
#echo ${LOG_MSG}
#
#LOGDIR=./tests/logs/_tests_dl_callbacks/trace
#CHECKPOINTS=${LOGDIR}/checkpoints
#TRACE=${LOGDIR}/trace
#LOGFILE=${CHECKPOINTS}/_metrics.json
#
#PYTHONPATH=./examples:./catalyst:${PYTHONPATH} \
# python catalyst/dl/scripts/run.py \
# --expdir=${EXPDIR} \
# --config=${EXPDIR}/config20.yml \
# --logdir=${LOGDIR} > ${EXP_OUTPUT}
#
#cat ${EXP_OUTPUT}
#
#check_file_existence ${LOGFILE}
#cat ${LOGFILE}
#echo ${LOG_MSG}
#
#check_checkpoints "${CHECKPOINTS}/best" 1
#check_checkpoints "${CHECKPOINTS}/last" 1
#check_checkpoints "${CHECKPOINTS}/stage1\.[[:digit:]]" 1
#check_num_files ${CHECKPOINTS} 7 # 3x2 checkpoints + _metrics.json
#check_num_files ${TRACE} 1

rm -rf ./tests/logs/_tests_dl_callbacks ${EXP_OUTPUT}
4 changes: 2 additions & 2 deletions bin/tests/check_dl_core_overfit_callback.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ from catalyst import utils
metrics = utils.load_config('$LOGFILE')
assert metrics['stage1.1']['loss'] < 2.0
assert metrics['stage1.1']['accuracy01'] > 0.65
assert metrics['stage1.1']['accuracy03'] > 0.8
assert metrics['stage1.1']['accuracy05'] > 0.9
assert metrics['stage1.1']['accuracy03'] > 0.75
assert metrics['stage1.1']['accuracy05'] > 0.85
"""

rm -rf ${LOGDIR} ${EXP_OUTPUT}
4 changes: 2 additions & 2 deletions catalyst/contrib/dl/callbacks/tests/test_gradnorm_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def test_save_model_grads():
Tests a feature of `OptimizerCallback` for saving model gradients
"""
logdir = "./logs"
dataset_root = "./dataset"
dataset_root = "./data"
loaders = _get_loaders(root=dataset_root, batch_size=4, num_workers=1)
images, _ = next(iter(loaders["train"]))
_, c, h, w = images.shape
Expand Down Expand Up @@ -159,4 +159,4 @@ def test_save_model_grads():
)

shutil.rmtree(logdir)
shutil.rmtree(dataset_root)
# shutil.rmtree(dataset_root)
4 changes: 2 additions & 2 deletions catalyst/contrib/dl/callbacks/tests/test_tracer_callback.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def test_tracer_callback():
Tests a feature of `TracerCallback` for model tracing during training
"""
logdir = "./logs"
dataset_root = "./dataset"
dataset_root = "./data"
loaders = _get_loaders(root=dataset_root, batch_size=4, num_workers=1)
images, targets = next(iter(loaders["train"]))
_, c, h, w = images.shape
Expand Down Expand Up @@ -225,4 +225,4 @@ def test_tracer_callback():
)

shutil.rmtree(logdir)
shutil.rmtree(dataset_root)
# shutil.rmtree(dataset_root)
13 changes: 8 additions & 5 deletions tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@ We train a number of different models for various of tasks:
During the tests, we compare their convergence metrics in order to verify
the correctness of the training procedure and its reproducibility.

[Catalyst CI](http://66.248.205.49:8111/project.html?projectId=Catalyst&tab=projectOverview&guest=1)
performs tests under various trainer conditions:
Our Continuous Integration pipelines
perform tests under various training conditions:
- Python 3.6, 3.7, 3.8
- PyTorch 1.1, 1.2, 1.3, 1.4, 1.5
- Linux, OSX
- CPU only
- 1 GPU
- 2 GPUs
Expand All @@ -38,11 +41,11 @@ pytest .

# run deep learning tests
## CPU
bash ./teamcity/dl_cpu.sh
bash ./bin/teamcity/dl_cpu.sh
## GPU
bash ./teamcity/dl_gpu.sh
bash ./bin/teamcity/dl_gpu.sh
## GPUs
bash ./teamcity/dl_gpu2.sh
bash ./bin/teamcity/dl_gpu2.sh
```

To test models that require GPU make sure to run the above command on a GPU machine.
Expand Down
2 changes: 1 addition & 1 deletion tests/_tests_scripts/dl_z_mvp_distributed_mnist_ae.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def datasets_fn():
Docs.
"""
dataset = MNIST(
os.getcwd(), train=False, download=True, transform=ToTensor(),
"./data", train=False, download=True, transform=ToTensor(),
)
return {"train": dataset, "valid": dataset}

Expand Down
2 changes: 1 addition & 1 deletion tests/_tests_scripts/dl_z_mvp_mnist.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

loaders = {
"train": DataLoader(
MNIST(os.getcwd(), train=True, download=True, transform=ToTensor()),
MNIST("./data", train=True, download=True, transform=ToTensor()),
batch_size=32,
),
}
Expand Down
8 changes: 2 additions & 6 deletions tests/_tests_scripts/dl_z_mvp_mnist_ae.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,11 @@ def main():

loaders = {
"train": DataLoader(
MNIST(
os.getcwd(), train=False, download=True, transform=ToTensor(),
),
MNIST("./data", train=False, download=True, transform=ToTensor(),),
batch_size=32,
),
"valid": DataLoader(
MNIST(
os.getcwd(), train=False, download=True, transform=ToTensor(),
),
MNIST("./data", train=False, download=True, transform=ToTensor(),),
batch_size=32,
),
}
Expand Down
4 changes: 1 addition & 3 deletions tests/_tests_scripts/dl_z_mvp_mnist_gan.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,7 @@ def main():
}
loaders = {
"train": DataLoader(
MNIST(
os.getcwd(), train=True, download=True, transform=ToTensor(),
),
MNIST("./data", train=True, download=True, transform=ToTensor(),),
batch_size=32,
),
}
Expand Down
8 changes: 2 additions & 6 deletions tests/_tests_scripts/dl_z_mvp_mnist_unet.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,11 @@ def main():

loaders = {
"train": DataLoader(
MNIST(
os.getcwd(), train=False, download=True, transform=ToTensor(),
),
MNIST("./data", train=False, download=True, transform=ToTensor(),),
batch_size=32,
),
"valid": DataLoader(
MNIST(
os.getcwd(), train=False, download=True, transform=ToTensor(),
),
MNIST("./data", train=False, download=True, transform=ToTensor(),),
batch_size=32,
),
}
Expand Down
8 changes: 2 additions & 6 deletions tests/_tests_scripts/dl_z_mvp_mnist_vae.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,11 @@ def main():

loaders = {
"train": DataLoader(
MNIST(
os.getcwd(), train=False, download=True, transform=ToTensor(),
),
MNIST("./data", train=False, download=True, transform=ToTensor(),),
batch_size=32,
),
"valid": DataLoader(
MNIST(
os.getcwd(), train=False, download=True, transform=ToTensor(),
),
MNIST("./data", train=False, download=True, transform=ToTensor(),),
batch_size=32,
),
}
Expand Down

0 comments on commit 985f32b

Please sign in to comment.