Skip to content

Commit

Permalink
changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
Borda committed Mar 27, 2020
1 parent 96a2825 commit 234f959
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 9 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).

### Changed

-
- Profiling moved from `profiler` to `profiling`. ([#1259](https://github.com/PyTorchLightning/pytorch-lightning/pull/1259))

### Deprecated

Expand Down Expand Up @@ -63,7 +63,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Support for user defined callbacks ([#889](https://github.com/PyTorchLightning/pytorch-lightning/pull/889) and [#950](https://github.com/PyTorchLightning/pytorch-lightning/pull/950))
- Added support for multiple loggers to be passed to `Trainer` as an iterable (e.g. list, tuple, etc.) ([#903](https://github.com/PyTorchLightning/pytorch-lightning/pull/903))
- Added support for step-based learning rate scheduling ([#941](https://github.com/PyTorchLightning/pytorch-lightning/pull/941))
- Added support for logging hparams as dict ([#1029](https://github.com/PyTorchLightning/pytorch-lightning/pull/1029))
- Added support for logging `hparams` as dict ([#1029](https://github.com/PyTorchLightning/pytorch-lightning/pull/1029))
- Checkpoint and early stopping now work without val. step ([#1041](https://github.com/PyTorchLightning/pytorch-lightning/pull/1041))
- Support graceful training cleanup after Keyboard Interrupt ([#856](https://github.com/PyTorchLightning/pytorch-lightning/pull/856), [#1019](https://github.com/PyTorchLightning/pytorch-lightning/pull/1019))
- Added type hints for function arguments ([#912](https://github.com/PyTorchLightning/pytorch-lightning/pull/912), )
Expand Down
12 changes: 12 additions & 0 deletions pytorch_lightning/profiler/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
"""
.. warning:: `profiler` package has been renamed to `profiling` since v0.7.2 and will be removed in v0.9.0
"""

import warnings

warnings.warn("`profiler` package has been renamed to `profiling` since v0.7.2."
" The deprecated module name will be removed in v0.9.0.", DeprecationWarning)

from pytorch_lightning.profiling.profilers import ( # noqa: F403
SimpleProfiler, AdvancedProfiler, BaseProfiler, PassThroughProfiler
)
4 changes: 2 additions & 2 deletions pytorch_lightning/profiling/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,11 @@ def custom_processing_step(self, data):
"""

from pytorch_lightning.profiling.profilers import Profiler, AdvancedProfiler, PassThroughProfiler, BaseProfiler
from pytorch_lightning.profiling.profilers import SimpleProfiler, AdvancedProfiler, PassThroughProfiler, BaseProfiler

__all__ = [
'BaseProfiler',
'Profiler',
'SimpleProfiler',
'AdvancedProfiler',
'PassThroughProfiler',
]
2 changes: 1 addition & 1 deletion pytorch_lightning/profiling/profilers.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def summary(self) -> str:
return ""


class Profiler(BaseProfiler):
class SimpleProfiler(BaseProfiler):
"""
This profiler simply records the duration of actions (in seconds) and reports
the mean duration of each action and the total time spent over the entire training run.
Expand Down
4 changes: 2 additions & 2 deletions pytorch_lightning/trainer/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from pytorch_lightning.callbacks import ModelCheckpoint, EarlyStopping, Callback
from pytorch_lightning.core.lightning import LightningModule
from pytorch_lightning.loggers import LightningLoggerBase
from pytorch_lightning.profiling import Profiler, PassThroughProfiler, BaseProfiler
from pytorch_lightning.profiling import SimpleProfiler, PassThroughProfiler, BaseProfiler
from pytorch_lightning.trainer.auto_mix_precision import TrainerAMPMixin
from pytorch_lightning.trainer.callback_config import TrainerCallbackConfigMixin
from pytorch_lightning.trainer.callback_hook import TrainerCallbackHookMixin
Expand Down Expand Up @@ -366,7 +366,7 @@ def __init__(

# configure profiler
if profiler is True:
profiler = Profiler()
profiler = SimpleProfiler()
self.profiler = profiler or PassThroughProfiler()

# configure early stop callback
Expand Down
2 changes: 2 additions & 0 deletions tests/test_deprecated.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ def test_tbd_remove_in_v0_9_0_module_imports():
from pytorch_lightning.logging.test_tube import TestTubeLogger # noqa: F402
from pytorch_lightning.logging.wandb import WandbLogger # noqa: F402

from pytorch_lightning.profiler import SimpleProfiler, AdvancedProfiler # noqa: F402


class ModelVer0_6(LightTrainDataloader, LightEmptyTestStep, TestModelBase):

Expand Down
4 changes: 2 additions & 2 deletions tests/test_profiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import numpy as np
import pytest
from pytorch_lightning.profiling import AdvancedProfiler, Profiler
from pytorch_lightning.profiling import AdvancedProfiler, SimpleProfiler

PROFILER_OVERHEAD_MAX_TOLERANCE = 0.0001

Expand All @@ -25,7 +25,7 @@ def _sleep_generator(durations):

@pytest.fixture
def simple_profiler():
profiler = Profiler()
profiler = SimpleProfiler()
return profiler


Expand Down

0 comments on commit 234f959

Please sign in to comment.