Shortcuts

RichProgressBar

class pytorch_lightning.callbacks.RichProgressBar(refresh_rate_per_second=10, theme=RichProgressBarTheme(text_color='white', progress_bar_complete='#6206E0', progress_bar_finished='#6206E0', progress_bar_pulse='#6206E0', batch_process='white', time='grey54', processing_speed='grey70'))[source]

Bases: pytorch_lightning.callbacks.progress.base.ProgressBarBase

Create a progress bar with rich text formatting.

Install it with pip:

pip install rich
from pytorch_lightning import Trainer
from pytorch_lightning.callbacks import RichProgressBar

trainer = Trainer(callbacks=RichProgressBar())
Parameters
  • refresh_rate_per_second (int) – the number of updates per second. If refresh_rate is 0, progress bar is disabled.

  • theme (RichProgressBarTheme) – Contains styles used to stylize the progress bar.

Raises

ModuleNotFoundError – If required rich package is not installed on the device.

disable()[source]

You should provide a way to disable the progress bar.

The Trainer will call this to disable the output on processes that have a rank different from 0, e.g., in multi-node training.

Return type

None

enable()[source]

You should provide a way to enable the progress bar.

The Trainer will call this in e.g. pre-training routines like the learning rate finder to temporarily enable and disable the main progress bar.

Return type

None

on_exception(trainer, pl_module, exception)[source]

Called when any trainer execution is interrupted by an exception.

Return type

None

on_predict_batch_end(trainer, pl_module, outputs, batch, batch_idx, dataloader_idx)[source]

Called when the predict batch ends.

on_predict_epoch_start(trainer, pl_module)[source]

Called when the predict epoch begins.

on_predict_start(trainer, pl_module)[source]

Called when the predict begins.

on_sanity_check_end(trainer, pl_module)[source]

Called when the validation sanity check ends.

on_sanity_check_start(trainer, pl_module)[source]

Called when the validation sanity check starts.

on_test_batch_end(trainer, pl_module, outputs, batch, batch_idx, dataloader_idx)[source]

Called when the test batch ends.

on_test_epoch_start(trainer, pl_module)[source]

Called when the test epoch begins.

on_test_start(trainer, pl_module)[source]

Called when the test begins.

on_train_batch_end(trainer, pl_module, outputs, batch, batch_idx)[source]

Called when the train batch ends.

on_train_epoch_start(trainer, pl_module)[source]

Called when the train epoch begins.

on_train_start(trainer, pl_module)[source]

Called when the train begins.

on_validation_batch_end(trainer, pl_module, outputs, batch, batch_idx, dataloader_idx)[source]

Called when the validation batch ends.

on_validation_epoch_end(trainer, pl_module)[source]

Called when the val epoch ends.

on_validation_epoch_start(trainer, pl_module)[source]

Called when the val epoch begins.

on_validation_start(trainer, pl_module)[source]

Called when the validation loop begins.

teardown(trainer, pl_module, stage=None)[source]

Called when fit, validate, test, predict, or tune ends.

Return type

None

property refresh_rate_per_second: float

Refresh rate for Rich Progress.

Returns: Refresh rate for Progress Bar.

Return 1 if not enabled, as a positive integer is required (ignored by Rich Progress).

Return type

float

Read the Docs v: latest
Versions
latest
stable
1.4.9
1.4.8
1.4.7
1.4.6
1.4.5
1.4.4
1.4.3
1.4.2
1.4.1
1.4.0
1.3.8
1.3.7
1.3.6
1.3.5
1.3.4
1.3.3
1.3.2
1.3.1
1.3.0
1.2.10
1.2.8
1.2.7
1.2.6
1.2.5
1.2.4
1.2.3
1.2.2
1.2.1
1.2.0
1.1.8
1.1.7
1.1.6
1.1.5
1.1.4
1.1.3
1.1.2
1.1.1
1.1.0
1.0.8
1.0.7
1.0.6
1.0.5
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0
0.10.0
0.9.0
0.8.5
0.8.4
0.8.3
0.8.2
0.8.1
0.8.0
0.7.6
0.7.5
0.7.4
0.7.3
0.7.2
0.7.1
0.7.0
0.6.0
0.5.3
0.4.9
ipynb-update
docs-search
Downloads
html
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.