Shortcuts
reg. user 1.6

If

Then

Ref

used Trainer’s flag terminate_on_nan

set detect_anomaly instead, which enables detecting anomalies in the autograd engine

PR9175

used Trainer’s flag weights_summary

pass a ModelSummary callback with max_depth instead

PR9699

used Trainer’s flag checkpoint_callback

set enable_checkpointing. If you set enable_checkpointing=True, it configures a default ModelCheckpoint callback if none is provided lightning_pytorch.trainer.trainer.Trainer.callbacks.ModelCheckpoint

PR9754

used Trainer’s flag stochastic_weight_avg

add the StochasticWeightAveraging callback directly to the list of callbacks, so for example, Trainer(..., callbacks=[StochasticWeightAveraging(), ...])

PR8989

used Trainer’s flag flush_logs_every_n_steps

pass it to the logger init if it is supported for the particular logger

PR9366

used Trainer’s flag max_steps to the Trainer, max_steps=None won’t have any effect

turn off the limit by passing Trainer(max_steps=-1) which is the default

PR9460

used Trainer’s flag resume_from_checkpoint="..."

pass the same path to the fit function instead, trainer.fit(ckpt_path="...")

PR9693

used Trainer’s flag log_gpu_memory, gpu_metrics

use the DeviceStatsMonitor callback instead

PR9921

used Trainer’s flag progress_bar_refresh_rate

set the ProgressBar callback and set refresh_rate there, or pass enable_progress_bar=False to disable the progress bar

PR9616

called LightningModule.summarize()

use the utility function pl.utilities.model_summary.summarize(model)

PR8513

used the LightningModule.model_size property

use the utility function pl.utilities.memory.get_model_size_mb(model)

PR8495

relied on the on_train_dataloader() hooks in LightningModule and LightningDataModule

use train_dataloader

PR9098

relied on the on_val_dataloader() hooks in LightningModule and LightningDataModule

use val_dataloader

PR9098

relied on the on_test_dataloader() hooks in LightningModule and LightningDataModule

use test_dataloader

PR9098

relied on the on_predict_dataloader() hooks in LightningModule and LightningDataModule

use predict_dataloader

PR9098

implemented the on_keyboard_interrupt callback hook

implement the on_exception hook, and specify the exception type

PR9260

relied on the TestTubeLogger

Use another logger like TensorBoardLogger

PR9065

used the basic progress bar ProgressBar callback

use the TQDMProgressBar callback instead with the same arguments

PR10134

were using GPUStatsMonitor callbacks

use DeviceStatsMonitor callback instead

PR9924

were using XLAStatsMonitor callbacks

use DeviceStatsMonitor callback instead

PR9924


© Copyright Copyright (c) 2018-2023, Lightning AI et al...

Built with Sphinx using a theme provided by Read the Docs.