Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nuke RPC #8101

Merged
merged 3 commits into from
Jun 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Removed deprecated utils modules `model_utils`, `warning_utils`, `xla_device_utils` and partially `argparse_utils` ([#7503](https://github.com/PyTorchLightning/pytorch-lightning/pull/7503))


- Removed `RPCPlugin` and `RPCSequentialPlugin`. If you were successfully using these plugins, please open a GitHub discussion about your use case ([#8101](https://github.com/PyTorchLightning/pytorch-lightning/pull/8101))


- Removed deprecated trainer attributes - `on_cpu`, `on_tpu`, `use_tpu`, `on_gpu`, `use_dp`, `use_ddp`, `use_ddp2`, `use_horovod`, `use_single_gpu` ([#7501](https://github.com/PyTorchLightning/pytorch-lightning/pull/7501))


Expand Down
2 changes: 0 additions & 2 deletions docs/source/api_references.rst
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,6 @@ Training Type Plugins
DDPSpawnPlugin
DeepSpeedPlugin
HorovodPlugin
RPCPlugin
RPCSequentialPlugin
SingleTPUPlugin
TPUSpawnPlugin

Expand Down
2 changes: 0 additions & 2 deletions docs/source/extensions/plugins.rst
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,6 @@ Training Type Plugins
DDPSpawnPlugin
DeepSpeedPlugin
HorovodPlugin
RPCPlugin
RPCSequentialPlugin
SingleTPUPlugin
TPUSpawnPlugin

Expand Down
226 changes: 0 additions & 226 deletions pl_examples/basic_examples/conv_sequential_example.py

This file was deleted.

4 changes: 0 additions & 4 deletions pytorch_lightning/accelerators/accelerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,10 +394,6 @@ def precision(self) -> Union[str, int]:
def scaler(self) -> Optional['GradScaler']:
return getattr(self.precision_plugin, 'scaler', None)

@property
def rpc_enabled(self) -> bool:
return self.training_type_plugin.rpc_enabled

def optimizer_state(self, optimizer: Optimizer) -> Dict[str, Tensor]:
"""
Returns state of an optimizer. Allows for syncing/collating optimizer state from processes in custom
Expand Down
9 changes: 0 additions & 9 deletions pytorch_lightning/callbacks/model_checkpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -483,15 +483,6 @@ def _del_model(self, trainer: 'pl.Trainer', filepath: str) -> None:
log.debug(f"Removed checkpoint: {filepath}")

def _save_model(self, trainer: 'pl.Trainer', filepath: str) -> None:
if trainer.training_type_plugin.rpc_enabled:
# RPCPlugin manages saving all model states
# TODO: the rpc plugin should wrap trainer.save_checkpoint
# instead of us having to do it here manually
trainer.training_type_plugin.rpc_save_model(trainer, self._do_save, filepath)
else:
self._do_save(trainer, filepath)

def _do_save(self, trainer: 'pl.Trainer', filepath: str) -> None:
# in debugging, track when we save checkpoints
trainer.dev_debugger.track_checkpointing_history(filepath)

Expand Down
4 changes: 0 additions & 4 deletions pytorch_lightning/plugins/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
from pytorch_lightning.plugins.training_type.horovod import HorovodPlugin # noqa: F401
from pytorch_lightning.plugins.training_type.ipu import IPUPlugin # noqa: F401
from pytorch_lightning.plugins.training_type.parallel import ParallelPlugin # noqa: F401
from pytorch_lightning.plugins.training_type.rpc import RPCPlugin # noqa: F401
from pytorch_lightning.plugins.training_type.rpc_sequential import RPCSequentialPlugin # noqa: F401
from pytorch_lightning.plugins.training_type.sharded import DDPShardedPlugin # noqa: F401
from pytorch_lightning.plugins.training_type.sharded_spawn import DDPSpawnShardedPlugin # noqa: F401
from pytorch_lightning.plugins.training_type.single_device import SingleDevicePlugin # noqa: F401
Expand Down Expand Up @@ -53,8 +51,6 @@
"SingleTPUPlugin",
"TPUHalfPrecisionPlugin",
"TPUSpawnPlugin",
"RPCPlugin",
"RPCSequentialPlugin",
"TrainingTypePlugin",
"ParallelPlugin",
"Plugin",
Expand Down
2 changes: 0 additions & 2 deletions pytorch_lightning/plugins/training_type/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
from pytorch_lightning.plugins.training_type.fully_sharded import DDPFullyShardedPlugin # noqa: F401
from pytorch_lightning.plugins.training_type.horovod import HorovodPlugin # noqa: F401
from pytorch_lightning.plugins.training_type.parallel import ParallelPlugin # noqa: F401
from pytorch_lightning.plugins.training_type.rpc import RPCPlugin # noqa: F401
from pytorch_lightning.plugins.training_type.rpc_sequential import RPCSequentialPlugin # noqa: F401
from pytorch_lightning.plugins.training_type.sharded import DDPShardedPlugin # noqa: F401
from pytorch_lightning.plugins.training_type.sharded_spawn import DDPSpawnShardedPlugin # noqa: F401
from pytorch_lightning.plugins.training_type.single_device import SingleDevicePlugin # noqa: F401
Expand Down
85 changes: 0 additions & 85 deletions pytorch_lightning/plugins/training_type/rpc.py

This file was deleted.

Loading