Skip to content

Commit a40affb

Browse files
pre-commit-ci[bot]Bordaawaelchli
authored
[pre-commit.ci] pre-commit suggestions (#20035)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Jirka Borovec <[email protected]> Co-authored-by: awaelchli <[email protected]>
1 parent 3730e98 commit a40affb

File tree

20 files changed

+33
-33
lines changed

20 files changed

+33
-33
lines changed

.github/CODE_OF_CONDUCT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ In the interest of fostering an open and welcoming environment, we as
66
contributors and maintainers pledge to making participation in our project and
77
our community a harassment-free experience for everyone, regardless of age, body
88
size, disability, ethnicity, sex characteristics, gender identity and expression,
9-
level of experience, education, socio-economic status, nationality, personal
9+
level of experience, education, socioeconomic status, nationality, personal
1010
appearance, race, religion, or sexual identity and orientation.
1111

1212
## Our Standards

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ ci:
2323

2424
repos:
2525
- repo: https://github.com/pre-commit/pre-commit-hooks
26-
rev: v4.5.0
26+
rev: v4.6.0
2727
hooks:
2828
- id: end-of-file-fixer
2929
- id: trailing-whitespace
@@ -51,7 +51,7 @@ repos:
5151
- id: detect-private-key
5252

5353
- repo: https://github.com/codespell-project/codespell
54-
rev: v2.2.6
54+
rev: v2.3.0
5555
hooks:
5656
- id: codespell
5757
additional_dependencies: [tomli]
@@ -70,7 +70,7 @@ repos:
7070
- id: sphinx-lint
7171

7272
- repo: https://github.com/astral-sh/ruff-pre-commit
73-
rev: v0.3.5
73+
rev: v0.5.0
7474
hooks:
7575
# try to fix what is possible
7676
- id: ruff

docs/source-pytorch/past_versions.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Past PyTorch Lightning versions
33

44
PyTorch Lightning :doc:`evolved over time <versioning>`. Here's the history of versions with links to their respective docs.
55

6-
To help you with keeping up to spead, check :doc:`Migration guide <upgrade/migration_guide>`.
6+
To help you with keeping up to speed, check :doc:`Migration guide <upgrade/migration_guide>`.
77

88
.. list-table:: Past versions
99
:widths: 5 50 30 15

examples/fabric/reinforcement_learning/train_fabric.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def main(args: argparse.Namespace):
8080
# Log hyperparameters
8181
fabric.logger.experiment.add_text(
8282
"hyperparameters",
83-
"|param|value|\n|-|-|\n%s" % ("\n".join([f"|{key}|{value}|" for key, value in vars(args).items()])),
83+
"|param|value|\n|-|-|\n{}".format("\n".join([f"|{key}|{value}|" for key, value in vars(args).items()])),
8484
)
8585

8686
# Environment setup

examples/fabric/reinforcement_learning/train_fabric_decoupled.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def player(args, world_collective: TorchCollective, player_trainer_collective: T
5555
# Log hyperparameters
5656
logger.experiment.add_text(
5757
"hyperparameters",
58-
"|param|value|\n|-|-|\n%s" % ("\n".join([f"|{key}|{value}|" for key, value in vars(args).items()])),
58+
"|param|value|\n|-|-|\n{}".format("\n".join([f"|{key}|{value}|" for key, value in vars(args).items()])),
5959
)
6060

6161
# Environment setup

examples/fabric/reinforcement_learning/train_torch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def main(args: argparse.Namespace):
138138
if global_rank == 0:
139139
logger.add_text(
140140
"hyperparameters",
141-
"|param|value|\n|-|-|\n%s" % ("\n".join([f"|{key}|{value}|" for key, value in vars(args).items()])),
141+
"|param|value|\n|-|-|\n{}".format("\n".join([f"|{key}|{value}|" for key, value in vars(args).items()])),
142142
)
143143

144144
# Environment setup

src/lightning/fabric/loggers/tensorboard.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def __init__(
107107
self._prefix = prefix
108108
self._fs = get_filesystem(root_dir)
109109

110-
self._experiment: Optional["SummaryWriter"] = None
110+
self._experiment: Optional[SummaryWriter] = None
111111
self._kwargs = kwargs
112112

113113
@property

src/lightning/fabric/strategies/deepspeed.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ def __init__(
291291
self.hysteresis = hysteresis
292292
self.min_loss_scale = min_loss_scale
293293

294-
self._deepspeed_engine: Optional["DeepSpeedEngine"] = None
294+
self._deepspeed_engine: Optional[DeepSpeedEngine] = None
295295

296296
@property
297297
def zero_stage_3(self) -> bool:

src/lightning/fabric/strategies/model_parallel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def __init__(
106106
self._timeout: Optional[timedelta] = timeout
107107
self._backward_sync_control = _ParallelBackwardSyncControl()
108108

109-
self._device_mesh: Optional["DeviceMesh"] = None
109+
self._device_mesh: Optional[DeviceMesh] = None
110110

111111
@property
112112
def device_mesh(self) -> "DeviceMesh":

src/lightning/pytorch/callbacks/progress/progress_bar.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def on_train_batch_end(self, trainer, pl_module, outputs, batch, batch_idx):
4848
"""
4949

5050
def __init__(self) -> None:
51-
self._trainer: Optional["pl.Trainer"] = None
51+
self._trainer: Optional[pl.Trainer] = None
5252
self._current_eval_dataloader_idx: Optional[int] = None
5353

5454
@property

0 commit comments

Comments
 (0)