Skip to content

Commit 0c783f3

Browse files
authored
Merge branch 'Lightning-AI:master' into master
2 parents 8c35cce + 76d3d22 commit 0c783f3

File tree

131 files changed

+960
-329
lines changed

Some content is hidden

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

131 files changed

+960
-329
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/ISSUE_TEMPLATE/1_bug_report.yaml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,22 @@ body:
4646
attributes:
4747
value: "**Note: The rest of this form is optional, but filling it out may help us to provide better support.**"
4848

49+
- type: input
50+
attributes:
51+
label: Reproduced in studio
52+
description: >
53+
Create a new Lightning Studio with code that reproduces the issue and share the link.
54+
Also include all the relevant files and data required to reproduce shared issue.
55+
In case the code does not crash, please add assert statements to show what is the real and expected output.
56+
A simple guide on how to create such a studio can be found [here](https://www.youtube.com/watch?v=YcW-2Zt_bFg&ab_channel=LightningAI).
57+
placeholder: https://lightning.ai/live-session/...
58+
validations:
59+
required: false
4960
- type: textarea
5061
attributes:
5162
label: How to reproduce the bug
5263
description: >
53-
Provide steps and example code here.
54-
You can also paste a link to Google Colab (see our [Colab bug report template](https://colab.research.google.com/github/Lightning-AI/lightning/blob/master/examples/pytorch/bug_report/bug_report_model.ipynb)) or adapt this minimal [snippet](https://github.com/Lightning-AI/lightning/blob/master/examples/pytorch/bug_report/bug_report_model.py).
64+
In the special case when the issue can't be reproduced in a studio, provide steps and example code here.
5565
placeholder: |
5666
```python
5767
# Sample code to reproduce the problem

.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/checkgroup.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -176,14 +176,15 @@ subprojects:
176176
- "lightning-fabric (GPUs) (testing Fabric | latest)"
177177
- "lightning-fabric (GPUs) (testing Lightning | latest)"
178178

179-
- id: "lightning_fabric: TPU workflow"
180-
paths:
181-
# tpu CI availability is very limited, so we only require tpu tests
182-
# to pass when their configurations are modified
183-
- ".github/workflows/tpu-tests.yml"
184-
- "tests/tests_fabric/run_tpu_tests.sh"
185-
checks:
186-
- "test-on-tpus (pytorch, pjrt, v4-8)"
179+
# Temporarily disabled
180+
# - id: "lightning_fabric: TPU workflow"
181+
# paths:
182+
# # tpu CI availability is very limited, so we only require tpu tests
183+
# # to pass when their configurations are modified
184+
# - ".github/workflows/tpu-tests.yml"
185+
# - "tests/tests_fabric/run_tpu_tests.sh"
186+
# checks:
187+
# - "test-on-tpus (pytorch, pjrt, v4-8)"
187188

188189
# SECTION: common
189190

.github/dependabot.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ updates:
1919
separator: "-"
2020
# Allow up to 5 open pull requests for pip dependencies
2121
open-pull-requests-limit: 10
22-
reviewers:
23-
- "Lightning-AI/teams/core-lightning"
2422

2523
# Enable version updates for GitHub Actions
2624
- package-ecosystem: "github-actions"
@@ -37,5 +35,3 @@ updates:
3735
separator: "-"
3836
# Allow up to 5 open pull requests for GitHub Actions
3937
open-pull-requests-limit: 10
40-
reviewers:
41-
- "Lightning-AI/teams/core-lightning"

.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/_legacy-checkpoints.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,13 @@ jobs:
111111
retention-days: ${{ env.KEEP_DAYS }}
112112
include-hidden-files: true
113113

114+
- name: access secrets
115+
# export to env bool if secrets.AWS_REGION is not empty
116+
run: echo "WITH_SECRETS=$([ -n '${{ secrets.AWS_REGION }}' ] && echo 1 || echo 0)" >> $GITHUB_ENV
117+
114118
- run: pip install -r requirements/ci.txt
115119
- name: Upload checkpoints to S3
116-
if: secrets.AWS_REGION != ''
120+
if: ${{ env.WITH_SECRETS == '1' }}
117121
working-directory: ${{ env.LEGACY_FOLDER }}
118122
env:
119123
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY }}

.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"

0 commit comments

Comments
 (0)