Skip to content

Commit 3938c73

Browse files
committed
Merge branch 'master' into feat/dynamo_export_onnx
2 parents 8f050ea + bd1c84e commit 3938c73

File tree

86 files changed

+430
-161
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+430
-161
lines changed

.actions/assistant.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,8 @@ def load_readme_description(path_dir: str, homepage: str, version: str) -> str:
154154
155155
"""
156156
path_readme = os.path.join(path_dir, "README.md")
157-
with open(path_readme, encoding="utf-8") as fo:
158-
text = fo.read()
157+
with open(path_readme, encoding="utf-8") as fopen:
158+
text = fopen.read()
159159

160160
# drop images from readme
161161
text = text.replace(
@@ -308,17 +308,17 @@ def copy_replace_imports(
308308
if ext in (".pyc",):
309309
continue
310310
# Try to parse everything else
311-
with open(fp, encoding="utf-8") as fo:
311+
with open(fp, encoding="utf-8") as fopen:
312312
try:
313-
lines = fo.readlines()
313+
lines = fopen.readlines()
314314
except UnicodeDecodeError:
315315
# a binary file, skip
316316
print(f"Skipped replacing imports for {fp}")
317317
continue
318318
lines = _replace_imports(lines, list(zip(source_imports, target_imports)), lightning_by=lightning_by)
319319
os.makedirs(os.path.dirname(fp_new), exist_ok=True)
320-
with open(fp_new, "w", encoding="utf-8") as fo:
321-
fo.writelines(lines)
320+
with open(fp_new, "w", encoding="utf-8") as fopen:
321+
fopen.writelines(lines)
322322

323323

324324
def create_mirror_package(source_dir: str, package_mapping: dict[str, str]) -> None:
@@ -370,10 +370,10 @@ def _prune_packages(req_file: str, packages: Sequence[str]) -> None:
370370

371371
@staticmethod
372372
def _replace_min(fname: str) -> None:
373-
with open(fname, encoding="utf-8") as fo:
374-
req = fo.read().replace(">=", "==")
375-
with open(fname, "w", encoding="utf-8") as fw:
376-
fw.write(req)
373+
with open(fname, encoding="utf-8") as fopen:
374+
req = fopen.read().replace(">=", "==")
375+
with open(fname, "w", encoding="utf-8") as fwrite:
376+
fwrite.write(req)
377377

378378
@staticmethod
379379
def replace_oldest_ver(requirement_fnames: Sequence[str] = REQUIREMENT_FILES_ALL) -> None:
@@ -471,15 +471,15 @@ def convert_version2nightly(ver_file: str = "src/version.info") -> None:
471471
"""Load the actual version and convert it to the nightly version."""
472472
from datetime import datetime
473473

474-
with open(ver_file) as fo:
475-
version = fo.read().strip()
474+
with open(ver_file) as fopen:
475+
version = fopen.read().strip()
476476
# parse X.Y.Z version and prune any suffix
477477
vers = re.match(r"(\d+)\.(\d+)\.(\d+).*", version)
478478
# create timestamp YYYYMMDD
479479
timestamp = datetime.now().strftime("%Y%m%d")
480480
version = f"{'.'.join(vers.groups())}.dev{timestamp}"
481-
with open(ver_file, "w") as fo:
482-
fo.write(version + os.linesep)
481+
with open(ver_file, "w") as fopen:
482+
fopen.write(version + os.linesep)
483483

484484
@staticmethod
485485
def generate_docker_tags(

.azure/gpu-tests-pytorch.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ jobs:
117117
set -e
118118
extra=$(python -c "print({'lightning': 'pytorch-'}.get('$(PACKAGE_NAME)', ''))")
119119
pip install -e ".[${extra}dev]" pytest-timeout -U --extra-index-url="${TORCH_URL}"
120-
pip install setuptools==75.6.0 jsonargparse==4.35.0
121120
displayName: "Install package & dependencies"
122121
123122
- bash: pip uninstall -y lightning

.github/CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,11 @@ In case you are adding new dependencies, make sure that they are compatible with
130130

131131
### Documentation
132132

133-
To learn about development of docs, check out the docs [README.md](https://github.com/Lightning-AI/lightning/blob/master/docs/README.md).
133+
To learn about development of docs, check out the docs [README.md](https://github.com/Lightning-AI/pytorch-lightning/blob/master/docs/README.md).
134134

135135
### Testing
136136

137-
To learn about tests, check out the tests [README.md](https://github.com/Lightning-AI/lightning/blob/master/tests/README.md).
137+
To learn about tests, check out the tests [README.md](https://github.com/Lightning-AI/pytorch-lightning/blob/master/tests/README.md).
138138

139139
### Pull Request
140140

@@ -165,8 +165,8 @@ We welcome any useful contribution! For your convenience here's a recommended wo
165165

166166
1. If any of the existing tests fail in your PR on our CI, refer to the following READMEs to identify what's failing and try to address it.
167167

168-
- [Test README](https://github.com/Lightning-AI/lightning/blob/master/tests/README.md)
169-
- [CI/CD README](https://github.com/Lightning-AI/lightning/blob/master/.github/workflows/README.md)
168+
- [Test README](https://github.com/Lightning-AI/pytorch-lightning/blob/master/tests/README.md)
169+
- [CI/CD README](https://github.com/Lightning-AI/pytorch-lightning/tree/master/.github/workflows#readme)
170170

171171
1. When you feel ready for integrating your work, mark your PR "Ready for review".
172172

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Fixes #\<issue_number>
1818
<summary><b>Before submitting</b></summary>
1919

2020
- Was this **discussed/agreed** via a GitHub issue? (not for typos and docs)
21-
- [ ] Did you read the [contributor guideline](https://github.com/Lightning-AI/lightning/blob/master/.github/CONTRIBUTING.md), **Pull Request** section?
21+
- [ ] Did you read the [contributor guideline](https://github.com/Lightning-AI/pytorch-lightning/blob/master/.github/CONTRIBUTING.md), **Pull Request** section?
2222
- [ ] Did you make sure your **PR does only one thing**, instead of bundling different changes together?
2323
- Did you make sure to **update the documentation** with your changes? (if necessary)
2424
- Did you write any **new necessary tests**? (not for typos and docs)

.github/markdown-links-config.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
"ignorePatterns": [
33
{
44
"pattern": "^https://github.com/Lightning-AI/pytorch-lightning/pull/"
5+
},
6+
{
7+
"pattern": "^https://dev.azure.com/Lightning-AI/lightning/_apis/build/status"
8+
},
9+
{
10+
"pattern": "^https://codecov.io/gh/Lightning-AI/pytorch-lightning/graph/badge.svg"
511
}
612
],
713
"httpHeaders": [

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,13 @@ on:
99
types: [opened, reopened, ready_for_review, synchronize]
1010
paths:
1111
- ".github/workflows/ci-check-md-links.yml"
12-
- ".github/workflows/markdown.links.config.json"
12+
- ".github/markdown-links-config.json"
1313
- "**/*.md"
1414

1515
jobs:
1616
check-md-links:
17-
uses: Lightning-AI/utilities/.github/workflows/check-md-links.yml@v0.14.3
17+
uses: Lightning-AI/utilities/.github/workflows/check-md-links.yml@main # can be pin with >=0.14.4
1818
with:
1919
config-file: ".github/markdown-links-config.json"
2020
base-branch: "master"
21+
force-check-all: "yes"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ ______________________________________________________________________
3131

3232
[![Discord](https://img.shields.io/discord/1077906959069626439?style=plastic)](https://discord.gg/VptPCZkGNa)
3333
![GitHub commit activity](https://img.shields.io/github/commit-activity/w/lightning-ai/lightning)
34-
[![license](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/Lightning-AI/lightning/blob/master/LICENSE)
34+
[![license](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/Lightning-AI/pytorch-lightning/blob/master/LICENSE)
3535

3636
<!--
3737
[![CodeFactor](https://www.codefactor.io/repository/github/Lightning-AI/lightning/badge)](https://www.codefactor.io/repository/github/Lightning-AI/lightning)

dockers/base-cuda/Dockerfile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,12 @@ ENV \
3434
MAKEFLAGS="-j2"
3535

3636
RUN \
37-
apt-get update && apt-get install -y wget && \
38-
apt-get update -qq --fix-missing && \
39-
NCCL_VER=$(dpkg -s libnccl2 | grep '^Version:' | awk -F ' ' '{print $2}' | awk -F '-' '{print $1}' | grep -ve '^\s*$') && \
4037
CUDA_VERSION_MM=${CUDA_VERSION%.*} && \
38+
apt-get update -qq --fix-missing && apt-get install -y wget && \
39+
NCCL_VER=$(dpkg -s libnccl2 | grep '^Version:' | awk -F ' ' '{print $2}' | awk -F '-' '{print $1}' | grep -ve '^\s*$') && \
40+
echo "NCCL version found: $NCCL_VER" && \
4141
TO_INSTALL_NCCL=$(echo -e "$MAX_ALLOWED_NCCL\n$NCCL_VER" | sort -V | head -n1)-1+cuda${CUDA_VERSION_MM} && \
42+
echo "NCCL version to install: $TO_INSTALL_NCCL" && \
4243
apt-get install -y --no-install-recommends --allow-downgrades --allow-change-held-packages \
4344
build-essential \
4445
pkg-config \
@@ -96,7 +97,7 @@ RUN \
9697
--extra-index-url="https://download.pytorch.org/whl/test/cu${CUDA_VERSION_MM//'.'/''}/"
9798

9899
RUN \
99-
# Show what we have
100+
# Show what we have \
100101
pip --version && \
101102
pip list && \
102103
python -c "import sys; ver = sys.version_info ; assert f'{ver.major}.{ver.minor}' == '$PYTHON_VERSION', ver" && \

docs/source-fabric/_templates/theme_variables.jinja

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{%- set external_urls = {
22
'github': 'https://github.com/Lightning-AI/lightning',
33
'github_issues': 'https://github.com/Lightning-AI/pytorch-lightning/issues',
4-
'contributing': 'https://github.com/Lightning-AI/lightning/blob/master/.github/CONTRIBUTING.md',
4+
'contributing': 'https://github.com/Lightning-AI/pytorch-lightning/blob/master/.github/CONTRIBUTING.md',
55
'governance': 'https://lightning.ai/docs/pytorch/latest/community/governance.html',
66
'docs': 'https://lightning.ai/docs/fabric/',
77
'twitter': 'https://twitter.com/LightningAI',

docs/source-fabric/advanced/compile.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ needed to achieve the equivalent of `compile(distributed(quantized(model)))`:
221221
222222
model = fabric.setup(model)
223223
224-
For a full example, see our `FP8 Distributed Transformer example <https://github.com/Lightning-AI/lightning/blob/master/examples/fabric/fp8_distributed_transformer>`_.
224+
For a full example, see our `FP8 Distributed Transformer example <https://github.com/Lightning-AI/pytorch-lightning/blob/master/examples/fabric/fp8_distributed_transformer>`_.
225225

226226
----
227227

0 commit comments

Comments
 (0)