* remove logging best so far metric values from mnist model

* update tests

* update README.md

* comment out wandb tests
This commit is contained in:
Łukasz Zalewski authored and GitHub committed 2021-05-01 00:24:17 +02:00
1 parent 4bdf4e62c6
commit d5da445e8d
7 files changed
+64 -111

No files matched your search

+6 -6
View File
@@ -2,6 +2,12 @@ from tests.helpers.run_command import run_command
from tests.helpers.runif import RunIf
def test_fast_dev_run():
"""Run 1 train, val, test batch."""
command = ["run.py", "trainer=default", "trainer.fast_dev_run=true"]
run_command(command)
def test_default_cpu():
"""Test default configuration on CPU."""
command = ["run.py", "trainer.max_epochs=1", "trainer.gpus=0"]
@@ -20,12 +26,6 @@ def test_default_gpu():
run_command(command)
def test_fast_dev_run():
"""Run 1 train, val, test batch."""
command = ["run.py", "trainer=default", "trainer.fast_dev_run=true"]
run_command(command)
def test_experiments():
"""Train 1 epoch with all experiment configs."""
command = ["run.py", "-m", "experiment=glob(*)", "trainer.max_epochs=1"]
+15 -4
View File
@@ -1,6 +1,14 @@
import pytest
from tests.helpers.run_command import run_command
"""
Use the following command to skip slow tests:
pytest -k "not slow"
"""
@pytest.mark.slow
def test_default_sweep():
"""Test default Hydra sweeper."""
command = [
@@ -14,6 +22,7 @@ def test_default_sweep():
run_command(command)
@pytest.mark.slow
def test_optuna_sweep():
"""Test Optuna sweeper."""
command = [
@@ -26,7 +35,9 @@ def test_optuna_sweep():
run_command(command)
# def test_ax_sweep():
# """Test Ax sweeper."""
# command = ["run.py", "-m", "hparams_search=mnist_ax", "trainer.fast_dev_run=true"]
# run_command(command)
@pytest.mark.skip(reason="TODO: Add Ax sweep config.")
@pytest.mark.slow
def test_ax_sweep():
"""Test Ax sweeper."""
command = ["run.py", "-m", "hparams_search=mnist_ax", "trainer.fast_dev_run=true"]
run_command(command)
+28 -28
View File
@@ -8,33 +8,33 @@ Use the following command to skip wandb tests:
"""
@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)
# @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)
@pytest.mark.wandb
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)
# @pytest.mark.wandb
# 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)