Skip to content

Commit 048966a

Browse files
authored
Merge branch 'master' into bump/deepspeed
2 parents 3cb99b9 + 8ff43d4 commit 048966a

File tree

7 files changed

+20
-19
lines changed

7 files changed

+20
-19
lines changed

.actions/assistant.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -341,19 +341,6 @@ def create_mirror_package(source_dir: str, package_mapping: dict[str, str]) -> N
341341

342342

343343
class AssistantCLI:
344-
@staticmethod
345-
def _replace_min(fname: str) -> None:
346-
with open(fname, encoding="utf-8") as fopen:
347-
req = fopen.read().replace(">=", "==")
348-
with open(fname, "w", encoding="utf-8") as fwrite:
349-
fwrite.write(req)
350-
351-
@staticmethod
352-
def replace_oldest_ver(requirement_fnames: Sequence[str] = REQUIREMENT_FILES_ALL) -> None:
353-
"""Replace the min package version by fixed one."""
354-
for fname in requirement_fnames:
355-
print(fname)
356-
AssistantCLI._replace_min(fname)
357344

358345
@staticmethod
359346
def copy_replace_imports(

.azure/gpu-tests-fabric.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,9 @@ jobs:
9999
displayName: "Image info & NVIDIA"
100100
101101
- bash: |
102-
python .actions/assistant.py replace_oldest_ver
102+
cd requirements/fabric
103+
pip install -U "lightning-utilities[cli]"
104+
python -m lightning_utilities.cli requirements set-oldest --req_files "['base.txt', 'strategies.txt']"
103105
pip install "cython<3.0" wheel # for compatibility
104106
pip install -U "lightning-utilities[cli]"
105107
# drop deepspeed since it is not supported by our minimal Torch requirements

.azure/gpu-tests-pytorch.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,9 @@ jobs:
103103
displayName: "Image info & NVIDIA"
104104
105105
- bash: |
106-
python .actions/assistant.py replace_oldest_ver
106+
cd requirements/pytorch
107+
pip install -U "lightning-utilities[cli]"
108+
python -m lightning_utilities.cli requirements set-oldest --req_files "['base.txt', 'extra.txt', 'strategies.txt', 'examples.txt']"
107109
pip install "cython<3.0" wheel # for compatibility
108110
pip install -U "lightning-utilities[cli]"
109111
# drop deepspeed since it is not supported by our minimal Torch requirements

.github/workflows/ci-tests-fabric.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,9 @@ jobs:
9494
- name: Set min. dependencies
9595
if: ${{ matrix.requires == 'oldest' }}
9696
run: |
97-
python .actions/assistant.py replace_oldest_ver
97+
cd requirements/fabric
98+
pip install -U "lightning-utilities[cli]"
99+
python -m lightning_utilities.cli requirements set-oldest --req_files "['base.txt', 'strategies.txt']"
98100
pip install "cython<3.0" wheel
99101
pip install "pyyaml==5.4" --no-build-isolation
100102

.github/workflows/ci-tests-pytorch.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,9 @@ jobs:
9999
- name: Set min. dependencies
100100
if: ${{ matrix.requires == 'oldest' }}
101101
run: |
102-
python .actions/assistant.py replace_oldest_ver
102+
cd requirements/pytorch
103+
pip install -U "lightning-utilities[cli]"
104+
python -m lightning_utilities.cli requirements set-oldest --req_files "['base.txt', 'extra.txt', 'strategies.txt', 'examples.txt']"
103105
pip install "cython<3.0" wheel
104106
pip install "pyyaml==5.4" --no-build-isolation
105107

.lightning/workflows/fabric.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@ run: |
4343
4444
if [ "${TORCH_VER}" == "2.1" ]; then
4545
echo "Set oldest versions"
46-
python .actions/assistant.py replace_oldest_ver
46+
cd requirements/fabric
47+
pip install -U "lightning-utilities[cli]"
48+
python -m lightning_utilities.cli requirements set-oldest --req_files "['base.txt', 'strategies.txt']"
49+
cd ../..
4750
pip install "cython<3.0" wheel # for compatibility
4851
fi
4952

.lightning/workflows/pytorch.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@ run: |
4343
4444
if [ "${TORCH_VER}" == "2.1" ]; then
4545
recho "Set oldest versions"
46-
python .actions/assistant.py replace_oldest_ver
46+
cd requirements/pytorch
47+
pip install -U "lightning-utilities[cli]"
48+
python -m lightning_utilities.cli requirements set-oldest --req_files "['base.txt', 'extra.txt', 'strategies.txt', 'examples.txt']"
49+
cd ../..
4750
pip install "cython<3.0" wheel # for compatibility
4851
fi
4952

0 commit comments

Comments
 (0)