Skip to content

Commit 4c90189

Browse files
committed
bump lightning dev sha, minor refactor of fsdp imports, update docker image to use PT 2.6.0-rc3
1 parent 546cf7e commit 4c90189

File tree

5 files changed

+18
-18
lines changed

5 files changed

+18
-18
lines changed

dockers/base-cuda/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,9 @@ RUN \
8888
# ... pytorch patch version
8989
# pip install torch==1.11.1+cu113 torchvision==0.11.3+cu113 -f https://download.pytorch.org/whl/cu113/torch_stable.html; \
9090
# ... pytorch nightly dev version
91-
pip install --pre torch==2.6.0.dev20241121 torchvision==0.20.0.dev20241121 --index-url https://download.pytorch.org/whl/nightly/cu126; \
91+
#pip install --pre torch==2.6.0.dev20241121 torchvision==0.20.0.dev20241121 --index-url https://download.pytorch.org/whl/nightly/cu126; \
9292
# ... test channel
93-
#pip install --pre torch==2.6.0 torchvision --index-url https://download.pytorch.org/whl/test/cu126; \
93+
pip install --pre torch==2.6.0 torchvision==0.21.0 --index-url https://download.pytorch.org/whl/test/cu126; \
9494
fi && \
9595
# Install all requirements
9696
pip install -r requirements/devel.txt --no-cache-dir && \

requirements/base.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#lightning>=2.6.0,<2.6.1
22
# the below is uncommented when master is targeting a specific pl dev master commit
3-
git+https://github.com/Lightning-AI/lightning.git@110d62185161cd0b11d8619336ddd139e5ee09dd#egg=lightning
3+
git+https://github.com/Lightning-AI/lightning.git@efe311cd46a372aeb5912ea5adfeef573a5d64ca#egg=lightning
44
torch>=2.3.0

requirements/standalone_base.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#pytorch-lightning>=2.6.0,<2.6.1
22
# the below is uncommented when master is targeting a specific pl dev master commit
3-
git+https://github.com/Lightning-AI/pytorch-lightning.git@110d62185161cd0b11d8619336ddd139e5ee09dd#egg=pytorch-lightning
3+
git+https://github.com/Lightning-AI/pytorch-lightning.git@efe311cd46a372aeb5912ea5adfeef573a5d64ca#egg=pytorch-lightning
44
torch>=2.3.0

setup.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -131,15 +131,15 @@ def _setup_args(standalone: bool = False) -> Dict[str, Any]:
131131
)
132132

133133
base_reqs = "standalone_base.txt" if standalone else "base.txt"
134-
install_requires = setup_tools._load_requirements(
135-
_INSTALL_PATHS["require"], file_name=base_reqs, standalone=standalone
136-
)
137134
# install_requires = setup_tools._load_requirements(
138-
# _INSTALL_PATHS["require"],
139-
# file_name=base_reqs,
140-
# standalone=standalone,
141-
# pl_commit="110d62185161cd0b11d8619336ddd139e5ee09dd",
135+
# _INSTALL_PATHS["require"], file_name=base_reqs, standalone=standalone
142136
# )
137+
install_requires = setup_tools._load_requirements(
138+
_INSTALL_PATHS["require"],
139+
file_name=base_reqs,
140+
standalone=standalone,
141+
pl_commit="efe311cd46a372aeb5912ea5adfeef573a5d64ca",
142+
)
143143
base_setup["install_requires"] = install_requires
144144
return base_setup
145145

src/finetuning_scheduler/strategy_adapters/_mp_imports.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@
77
# ruff: noqa: F401
88
# we require torch 2.5 or higher for composable distributed API support so until torch 2.5.0 is the minimum version,
99
# supported, we conditionally import indirectly to avoid duplicating import logic in several different modules
10+
1011
if _TORCH_GREATER_EQUAL_2_5:
11-
from torch.distributed._composable import checkpoint
12-
from torch.distributed._composable.fsdp._fsdp_api import CPUOffloadPolicy
13-
from torch.nn.attention import SDPBackend, sdpa_kernel
1412
from torch.distributed.device_mesh import DeviceMesh
1513
from torch.distributed.tensor import DTensor, Replicate, Shard
16-
from torch.distributed._tools.fsdp2_mem_tracker import FSDPMemTracker
1714
from torch.distributed.tensor.experimental import implicit_replication
18-
from torch.distributed._composable.fsdp import FSDPModule, fully_shard
19-
from torch.distributed.algorithms._checkpoint.checkpoint_wrapper import (checkpoint_wrapper, offload_wrapper,
20-
ActivationWrapper)
2115
from torch.distributed.tensor.parallel import (ColwiseParallel, PrepareModuleInput, RowwiseParallel,
2216
SequenceParallel, parallelize_module, loss_parallel)
17+
from torch.nn.attention import SDPBackend, sdpa_kernel
18+
from torch.distributed.algorithms._checkpoint.checkpoint_wrapper import (checkpoint_wrapper, offload_wrapper,
19+
ActivationWrapper)
20+
from torch.distributed._composable import checkpoint
21+
from torch.distributed._composable.fsdp import CPUOffloadPolicy, FSDPModule, fully_shard
22+
from torch.distributed._tools.fsdp2_mem_tracker import FSDPMemTracker
2323
else:
2424
for mp_obj in ["SDPBackend", "DeviceMesh", "DTensor", "Replicate", "Shard", "ColwiseParallel", "PrepareModuleInput",
2525
"RowwiseParallel", "SequenceParallel", "implicit_replication", "parallelize_module", "loss_parallel",

0 commit comments

Comments
 (0)