* add smoke tests implemented with pytest

* add sweep tests, wandb tests and mixed-precision tests

* update requirements.txt

* remove .autoenv.template file

* update readme
This commit is contained in:
Łukasz Zalewski authored and GitHub committed 2021-04-26 23:06:50 +02:00
1 parent 5cc767a595
commit e0293193f5
30 files changed
+572 -280

No files matched your search

+39
View File
@@ -0,0 +1,39 @@
import pytest
from tests.helpers.run_command import run_command
"""
Use the following command to skip wandb tests:
pytest -k "not wandb"
"""
@pytest.mark.wandb
def test_wandb_optuna_sweep():
"""Test wandb logging with Optuna sweep."""
command = [
"run.py",
"-m",
"hparams_search=mnist_optuna",
"trainer=default",
"trainer.max_epochs=10",
"trainer.limit_train_batches=20",
"logger=wandb",
"logger.wandb.project=template-tests",
"logger.wandb.group=Optuna_SimpleDenseNet_MNIST",
"hydra.sweeper.n_trials=5",
]
run_command(command)
def test_wandb_callbacks():
"""Test wandb callbacks."""
command = [
"run.py",
"trainer=default",
"trainer.max_epochs=3",
"logger=wandb",
"logger.wandb.project=template-tests",
"callbacks=wandb",
]
run_command(command)