Skip to content

Commit 7920118

Browse files
author
Seppo Enarvi
committed
Merge branch 'master' into generic-weight-averaging
2 parents 247935f + 831870a commit 7920118

File tree

11 files changed

+15
-18
lines changed

11 files changed

+15
-18
lines changed

.github/workflows/call-clear-cache.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,18 @@ on:
2323
jobs:
2424
cron-clear:
2525
if: github.event_name == 'schedule' || github.event_name == 'pull_request'
26-
uses: Lightning-AI/utilities/.github/workflows/[email protected].1
26+
uses: Lightning-AI/utilities/.github/workflows/[email protected].2
2727
with:
28-
scripts-ref: v0.14.1
28+
scripts-ref: v0.14.2
2929
dry-run: ${{ github.event_name == 'pull_request' }}
3030
pattern: "latest|docs"
3131
age-days: 7
3232

3333
direct-clear:
3434
if: github.event_name == 'workflow_dispatch' || github.event_name == 'pull_request'
35-
uses: Lightning-AI/utilities/.github/workflows/[email protected].1
35+
uses: Lightning-AI/utilities/.github/workflows/[email protected].2
3636
with:
37-
scripts-ref: v0.14.1
37+
scripts-ref: v0.14.2
3838
dry-run: ${{ github.event_name == 'pull_request' }}
3939
pattern: ${{ inputs.pattern || 'pypi_wheels' }} # setting str in case of PR / debugging
4040
age-days: ${{ fromJSON(inputs.age-days) || 0 }} # setting 0 in case of PR / debugging

.github/workflows/ci-check-md-links.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ on:
1414

1515
jobs:
1616
check-md-links:
17-
uses: Lightning-AI/utilities/.github/workflows/[email protected].1
17+
uses: Lightning-AI/utilities/.github/workflows/[email protected].2
1818
with:
1919
config-file: ".github/markdown-links-config.json"
2020
base-branch: "master"

.github/workflows/ci-schema.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
jobs:
1010
check:
11-
uses: Lightning-AI/utilities/.github/workflows/[email protected].1
11+
uses: Lightning-AI/utilities/.github/workflows/[email protected].2
1212
with:
1313
# skip azure due to the wrong schema file by MSFT
1414
# https://github.com/Lightning-AI/lightning-flash/pull/1455#issuecomment-1244793607

docs/source-pytorch/debug/debugging_basic.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,7 @@ A breakpoint stops your code execution so you can inspect variables, etc... and
3333
x = 2
3434
3535
# set breakpoint
36-
import pdb
37-
38-
pdb.set_trace()
36+
breakpoint()
3937
y = x**2
4038
4139
In this example, the code will stop before executing the ``y = x**2`` line.

requirements/fabric/test.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,3 @@ pytest-rerunfailures ==12.0
77
pytest-random-order ==1.1.0
88
click ==8.1.7
99
tensorboardX >=2.2, <2.7.0 # min version is set by torch.onnx missing attribute
10-
torchmetrics >=0.7.0, <1.5.0 # needed for using fixed compare_version

requirements/pytorch/base.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ torch >=2.1.0, <2.6.0
55
tqdm >=4.57.0, <4.67.0
66
PyYAML >=5.4, <6.1.0
77
fsspec[http] >=2022.5.0, <2024.4.0
8-
torchmetrics >=0.7.0, <1.5.0 # needed for using fixed compare_version
8+
torchmetrics >=0.7.0, <1.5.0
99
packaging >=20.0, <=23.1
1010
typing-extensions >=4.4.0, <4.11.0
1111
lightning-utilities >=0.10.0, <0.12.0

src/lightning/fabric/accelerators/registry.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,9 @@ def remove(self, name: str) -> None:
107107
"""Removes the registered accelerator by name."""
108108
self.pop(name)
109109

110-
def available_accelerators(self) -> list[str]:
111-
"""Returns a list of registered accelerators."""
112-
return list(self.keys())
110+
def available_accelerators(self) -> set[str]:
111+
"""Returns a set of registered accelerators."""
112+
return set(self.keys())
113113

114114
def __str__(self) -> str:
115115
return "Registered Accelerators: {}".format(", ".join(self.available_accelerators()))

src/lightning/fabric/utilities/spike.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def __init__(
5252
from torchmetrics.aggregation import MeanMetric
5353
from torchmetrics.wrappers import Running
5454
else:
55-
raise RuntimeError("SpikeDetection requires torchmetrics>=1.0.0! Please upgrade your version!")
55+
raise RuntimeError("SpikeDetection requires `torchmetrics>=1.0.0` Please upgrade your version.")
5656
super().__init__()
5757

5858
self.last_val: Union[torch.Tensor, float] = 0.0

src/lightning/pytorch/loggers/mlflow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ def _scan_and_log_checkpoints(self, checkpoint_callback: ModelCheckpoint) -> Non
363363
aliases = ["latest", "best"] if p == checkpoint_callback.best_model_path else ["latest"]
364364

365365
# Artifact path on mlflow
366-
artifact_path = Path(self._checkpoint_path_prefix) / Path(p).stem
366+
artifact_path = Path(self._checkpoint_path_prefix, Path(p).stem).as_posix()
367367

368368
# Log the checkpoint
369369
self.experiment.log_artifact(self._run_id, p, artifact_path)

tests/tests_fabric/accelerators/test_registry.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,4 @@ def is_available():
7070

7171

7272
def test_available_accelerators_in_registry():
73-
assert ACCELERATOR_REGISTRY.available_accelerators() == ["cpu", "cuda", "mps", "tpu"]
73+
assert ACCELERATOR_REGISTRY.available_accelerators() == {"cpu", "cuda", "mps", "tpu"}

0 commit comments

Comments
 (0)