|
25 | 25 | from pytorch_lightning.plugins.precision import ApexMixedPrecisionPlugin, NativeMixedPrecisionPlugin, PrecisionPlugin |
26 | 26 | from pytorch_lightning.plugins.training_type import TrainingTypePlugin |
27 | 27 | from pytorch_lightning.trainer.states import TrainerFn |
28 | | -from pytorch_lightning.utilities import _NATIVE_AMP_AVAILABLE, rank_zero_warn |
| 28 | +from pytorch_lightning.utilities import _NATIVE_AMP_AVAILABLE |
29 | 29 | from pytorch_lightning.utilities.apply_func import apply_to_collection, move_data_to_device |
30 | 30 | from pytorch_lightning.utilities.enums import AMPType, GradClipAlgorithmType, LightningEnum |
31 | 31 | from pytorch_lightning.utilities.types import STEP_OUTPUT |
@@ -429,32 +429,6 @@ def model_sharded_context(self) -> Generator[None, None, None]: |
429 | 429 | with self.training_type_plugin.model_sharded_context(): |
430 | 430 | yield |
431 | 431 |
|
432 | | - # todo: remove in v1.5 |
433 | | - def connect_training_type_plugin(self, plugin: TrainingTypePlugin, model: "pl.LightningModule") -> None: |
434 | | - """ |
435 | | - Attaches the training type plugin to the accelerator. |
436 | | - Also transfers ownership of the model to this plugin |
437 | | -
|
438 | | - .. deprecated::v1.3 |
439 | | - Will be removed in v1.5.0. |
440 | | - """ |
441 | | - rank_zero_warn( |
442 | | - "Accelerator method `connect_training_type_plugin` was deprecated in v1.3. It will be removed in v1.5." |
443 | | - ) |
444 | | - self.setup_training_type_plugin() |
445 | | - |
446 | | - # todo: remove in v1.5 |
447 | | - def connect_precision_plugin(self, plugin: PrecisionPlugin) -> None: |
448 | | - """Attaches the precision plugin to the accelerator |
449 | | -
|
450 | | - .. deprecated::v1.3 |
451 | | - Will be removed in v1.5.0. |
452 | | - """ |
453 | | - rank_zero_warn( |
454 | | - "Accelerator method `connect_precision_plugin` was deprecated in v1.3. It will be removed in v1.5." |
455 | | - ) |
456 | | - self.setup_precision_plugin() |
457 | | - |
458 | 432 | def save_checkpoint(self, checkpoint: Dict[str, Any], filepath: str) -> None: |
459 | 433 | """Save model/training states as a checkpoint file through state-dump and file-write. |
460 | 434 |
|
|
0 commit comments