Shortcuts
reg. user 1.4ΒΆ

If

Then

Ref

relied on the outputs in your LightningModule.on_train_epoch_end or Callback.on_train_epoch_end hooks

rely on either on_train_epoch_end or set outputs as attributes in your LightningModule instances and access them from the hook

PR7339

accessed Trainer.truncated_bptt_steps

swicth to manual optimization

PR7323

called LightningModule.write_predictions and LightningModule.write_predictions_dict

rely on predict_step and Trainer.predict + callbacks to write out predictions

PR7066

passed the period argument to the ModelCheckpoint callback

pass the every_n_epochs argument to the ModelCheckpoint callback

PR6146

passed the output_filename argument to Profiler

now pass dirpath and filename, that is Profiler(dirpath=...., filename=...)

PR6621

passed the profiled_functions argument in PytorchProfiler

now pass the record_functions argument

PR6349

relied on the @auto_move_data decorator to use the LightningModule outside of the Trainer for inference

use Trainer.predict

PR6993

implemented on_load_checkpoint with a checkpoint only argument, as in Callback.on_load_checkpoint(checkpoint)

now update the signature to include pl_module and trainer, as in Callback.on_load_checkpoint(trainer, pl_module, checkpoint)

PR7253

relied on pl.metrics

now import separate package torchmetrics

torchmetrics

accessed datamodule attribute of LightningModule, that is model.datamodule

now access Trainer.datamodule, that is model.trainer.datamodule

PR7168


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

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