Skip to content

Commit 3119822

Browse files
committed
drop from oldest
1 parent f775d32 commit 3119822

File tree

3 files changed

+6
-26
lines changed

3 files changed

+6
-26
lines changed

.actions/assistant.py

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

342342

343343
class AssistantCLI:
344-
@staticmethod
345-
def requirements_prune_pkgs(packages: Sequence[str], req_files: Sequence[str] = REQUIREMENT_FILES_ALL) -> None:
346-
"""Remove some packages from given requirement files."""
347-
if isinstance(req_files, str):
348-
req_files = [req_files]
349-
for req in req_files:
350-
AssistantCLI._prune_packages(req, packages)
351-
352-
@staticmethod
353-
def _prune_packages(req_file: str, packages: Sequence[str]) -> None:
354-
"""Remove some packages from given requirement files."""
355-
path = Path(req_file)
356-
assert path.exists()
357-
text = path.read_text()
358-
lines = text.splitlines()
359-
final = []
360-
for line in lines:
361-
ln_ = line.strip()
362-
if not ln_ or ln_.startswith("#"):
363-
final.append(line)
364-
continue
365-
req = list(_parse_requirements([ln_]))[0]
366-
if req.name not in packages:
367-
final.append(line)
368-
print(final)
369-
path.write_text("\n".join(final) + "\n")
370344

371345
@staticmethod
372346
def _replace_min(fname: str) -> None:

.azure/gpu-tests-fabric.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,9 @@ jobs:
101101
- bash: |
102102
python .actions/assistant.py replace_oldest_ver
103103
pip install "cython<3.0" wheel # for compatibility
104+
pip install -U "lightning-utilities[cli]"
105+
# drop deepspeed since it is not supported by our minimal Torch requirements
106+
python -m lightning_utilities.cli requirements prune-pkgs --packages deepspeed --req_files requirements/fabric/strategies.txt
104107
condition: contains(variables['Agent.JobName'], 'oldest')
105108
displayName: "setting oldest dependencies"
106109

.azure/gpu-tests-pytorch.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,9 @@ jobs:
105105
- bash: |
106106
python .actions/assistant.py replace_oldest_ver
107107
pip install "cython<3.0" wheel # for compatibility
108+
pip install -U "lightning-utilities[cli]"
109+
# drop deepspeed since it is not supported by our minimal Torch requirements
110+
python -m lightning_utilities.cli requirements prune-pkgs --packages deepspeed --req_files requirements/pytorch/strategies.txt
108111
condition: contains(variables['Agent.JobName'], 'oldest')
109112
displayName: "setting oldest dependencies"
110113

0 commit comments

Comments
 (0)