* update to Hydra 1.1 * add bash folder with scripts for conda setup and run scheduling * add saving seed in `log_hyperparameters()` method * redesign Dockerfile to make it weight less * add `test_after_training` parameter to config * add inheritance to trainer configs * remove forcing ddp-friendly configuration * refactor tests * remove conda_env_gpu.yaml * remove default langage version from pre-commit config * add mnist datamodule unit test * rename test folder from 'smoke' to 'shell' * remove wandb import from utils.py * change 'use_artifact' to 'log_artifact' in wandb callbacks * add rank zero decorator to wandb callbacks * add dumping rich tree config to file * get rid of `=` character in ckpt names * update requirements.txt * update LICENSE * update README.md
48 lines
1.1 KiB
Python
48 lines
1.1 KiB
Python
from tests.helpers.run_command import run_command
|
|
from tests.helpers.runif import RunIf
|
|
|
|
|
|
@RunIf(amp_apex=True)
|
|
def test_apex_O1():
|
|
"""Test mixed-precision level O1."""
|
|
command = [
|
|
"run.py",
|
|
"trainer=default",
|
|
"++trainer.max_epochs=1",
|
|
"++trainer.gpus=1",
|
|
"++trainer.amp_backend=apex",
|
|
"++trainer.amp_level=O1",
|
|
"++trainer.precision=16",
|
|
]
|
|
run_command(command)
|
|
|
|
|
|
@RunIf(amp_apex=True)
|
|
def test_apex_O2():
|
|
"""Test mixed-precision level O2."""
|
|
command = [
|
|
"run.py",
|
|
"trainer=default",
|
|
"++trainer.max_epochs=1",
|
|
"++trainer.gpus=1",
|
|
"++trainer.amp_backend=apex",
|
|
"++trainer.amp_level=O2",
|
|
"++trainer.precision=16",
|
|
]
|
|
run_command(command)
|
|
|
|
|
|
@RunIf(amp_apex=True)
|
|
def test_apex_O3():
|
|
"""Test mixed-precision level O3."""
|
|
command = [
|
|
"run.py",
|
|
"trainer=default",
|
|
"++trainer.max_epochs=1",
|
|
"++trainer.gpus=1",
|
|
"++trainer.amp_backend=apex",
|
|
"++trainer.amp_level=O3",
|
|
"++trainer.precision=16",
|
|
]
|
|
run_command(command)
|