Skip to content

Commit

Permalink
bump lightning dev sha, use stable channel for pt2.4, support python …
Browse files Browse the repository at this point in the history
…3.12, update docker image to use 3.12, support dynamo with 3.12, drop support for python 3.8
  • Loading branch information
speediedan committed Jul 25, 2024
1 parent 6371d42 commit bc94a66
Show file tree
Hide file tree
Showing 18 changed files with 32 additions and 30 deletions.
2 changes: 1 addition & 1 deletion .azure-pipelines/gpu-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
strategy:
matrix:
'PyTorch | latest':
image: "speediedan/finetuning-scheduler:py3.11-pt2.4.0-pl2.4-azpl-init"
image: "speediedan/finetuning-scheduler:py3.12-pt2.4.0-pl2.4-azpl-init"
scope: ""
# how long to run the job before automatically cancelling
timeoutInMinutes: "100"
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ You can also fill out the list below manually.
- Fine-Tuning Scheduler Version (e.g., 2.4.0):
- Lightning Version (e.g., 2.4.0):
- PyTorch Version (e.g., 2.4.0):
- Python version (e.g., 3.11):
- Python version (e.g., 3.12):
- OS (e.g., Linux):
- CUDA/cuDNN version:
- GPU models and configuration:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/ci_test-full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,17 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-22.04, windows-2022, macOS-14]
python-version: ["3.8", "3.11"] # minimum, maximum
python-version: ["3.9", "3.12"] # minimum, maximum
# tests will include oldest and newest tested patch versions of pytorch
requires: ["oldest", "latest"]
release: ["latest"]
exclude: # note that occasionally, the oldest PyTorch version does not support the latest python version
- {os: ubuntu-22.04, python-version: "3.11", requires: "oldest"}
- {os: windows-2022, python-version: "3.11", requires: "oldest"}
- {os: macOS-14, python-version: "3.11", requires: "oldest"}
- {os: ubuntu-22.04, python-version: "3.12", requires: "oldest"}
- {os: windows-2022, python-version: "3.12", requires: "oldest"}
- {os: macOS-14, python-version: "3.12", requires: "oldest"}
# include:
# # adding when using a release candidate
# # - {os: ubuntu-22.04, python-version: "3.10", requires: "latest", release: "pre"}
# # - {os: ubuntu-22.04, python-version: "3.12", requires: "latest", release: "pre"}

timeout-minutes: 90

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/code-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.11'
python-version: '3.12'
- name: Install dependencies
run: |
pip install '.[dev]'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
fail-fast: false
matrix:
# initially building only the latest supported configuration
python_version: ["3.11"]
python_version: ["3.12"]
pytorch_version: ["2.4.0"]
cust_base: ["cu12.4.0-"]
pl_version: ["2.4"]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.11'
python-version: '3.12'

- name: Install dependencies
run: >-
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ To ensure maximum stability, the latest Lightning patch release fully tested wit
<details>
<summary>Current build statuses for Fine-Tuning Scheduler </summary>

| System / (PyTorch/Python ver) | 2.1.2/3.8 | 2.4.0/3.8, 2.4.0/3.11 |
| System / (PyTorch/Python ver) | 2.1.2/3.9 | 2.4.0/3.9, 2.4.0/3.12 |
| :---------------------------: | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
| Linux \[GPUs\*\*\] | - | [![Build Status](https://dev.azure.com//speediedan/finetuning-scheduler/_apis/build/status/Multi-GPU%20&%20Example%20Tests?branchName=main)](https://dev.azure.com/speediedan/finetuning-scheduler/_build/latest?definitionId=1&branchName=main) |
| Linux (Ubuntu 22.04) | [![Test](https://github.com/speediedan/finetuning-scheduler/actions/workflows/ci_test-full.yml/badge.svg?branch=main&event=push)](https://github.com/speediedan/finetuning-scheduler/actions/workflows/ci_test-full.yml) | [![Test](https://github.com/speediedan/finetuning-scheduler/actions/workflows/ci_test-full.yml/badge.svg?branch=main&event=push)](https://github.com/speediedan/finetuning-scheduler/actions/workflows/ci_test-full.yml) |
Expand Down
10 changes: 5 additions & 5 deletions dockers/base-cuda/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ ARG OS_VER=ubuntu22.04

FROM nvidia/cuda:${CUDA_VERSION}-devel-${OS_VER}

ARG PYTHON_VERSION=3.11
ARG PYTHON_VERSION=3.12
ARG PYTORCH_VERSION=2.4.0
ARG CUST_BUILD=0
ARG MKL_THREADING_LAYER=GNU
Expand Down Expand Up @@ -85,25 +85,25 @@ RUN \
else \
# or target a specific cuda build, by specifying a particular index url w/...
# ... default channel
#pip install torch torchvision --extra-index-url https://download.pytorch.org/whl/cu121; \
pip install torch torchvision --index-url https://download.pytorch.org/whl/cu124; \
# ... pytorch patch version
# pip install torch==1.11.1+cu113 torchvision==0.11.3+cu113 -f https://download.pytorch.org/whl/cu113/torch_stable.html; \
# ... pytorch nightly dev version
#pip install --pre torch==2.4.0.dev20240601 torchvision==0.19.0.dev20240601 -f https://download.pytorch.org/whl/nightly/cu121/torch_nightly.html; \
# ... test channel
pip install --pre torch==2.4.0 torchvision --index-url https://download.pytorch.org/whl/test/cu124; \
#pip install --pre torch==2.4.0 torchvision --index-url https://download.pytorch.org/whl/test/cu124; \
fi && \
# Install all requirements
pip install -r requirements/devel.txt --no-cache-dir && \
# Update six to avoid unnecessary warnings associated with 3.10: https://github.com/benjaminp/six/pull/343
# Update six
pip install -U six --no-cache-dir && \
chmod -R 777 /tmp/venvs/fts_dev && \
rm -rf requirements.* requirements/

RUN \
. /tmp/venvs/fts_dev/bin/activate && \
CUDA_VERSION_MAJOR=$(python -c "import torch; print(torch.version.cuda.split('.')[0])") && \
py_ver=$(python -c "print(int('$PYTHON_VERSION'.split('.') >= '3.10'.split('.')))")
py_ver=$(python -c "print(int('$PYTHON_VERSION'.split('.') >= '3.12'.split('.')))")

RUN \
# Show what we have
Expand Down
2 changes: 1 addition & 1 deletion dockers/docker_images_main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ maybe_build(){

build_eval(){
# latest PyTorch image supported by release
declare -A iv=(["cuda"]="12.4.0" ["python"]="3.11" ["pytorch"]="2.4.0" ["lightning"]="2.4" ["cust_build"]="1")
declare -A iv=(["cuda"]="12.4.0" ["python"]="3.12" ["pytorch"]="2.4.0" ["lightning"]="2.4" ["cust_build"]="1")
export latest_pt="base-cu${iv["cuda"]}-py${iv["python"]}-pt${iv["pytorch"]}-pl${iv["lightning"]}"
export latest_azpl="py${iv["python"]}-pt${iv["pytorch"]}-pl${iv["lightning"]}-azpl-init"
maybe_build iv "${latest_pt}" "${latest_azpl}"
Expand Down
2 changes: 1 addition & 1 deletion dockers/docker_images_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ maybe_build(){

build_eval(){
# latest PyTorch image supported by release
declare -A iv=(["cuda"]="12.4.0" ["python"]="3.11" ["pytorch"]="2.4.0" ["lightning"]="2.4" ["cust_build"]="0")
declare -A iv=(["cuda"]="12.4.0" ["python"]="3.12" ["pytorch"]="2.4.0" ["lightning"]="2.4" ["cust_build"]="0")
export latest_pt="base-cu${iv["cuda"]}-py${iv["python"]}-pt${iv["pytorch"]}-pl${iv["lightning"]}"
export latest_azpl="py${iv["python"]}-pt${iv["pytorch"]}-pl${iv["lightning"]}-azpl-init"
maybe_build iv "${latest_pt}" "${latest_azpl}"
Expand Down
2 changes: 1 addition & 1 deletion dockers/fts-az-base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

ARG PYTHON_VERSION=3.11
ARG PYTHON_VERSION=3.12
ARG PYTORCH_VERSION=2.4.0
ARG LIGHTNING_VERSION=2.4
ARG CUST_BASE
Expand Down
2 changes: 1 addition & 1 deletion dockers/release-conda/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ ARG CUDA_VERSION=11.8
FROM nvidia/cuda:${CUDA_VERSION}-devel-ubuntu22.04

ARG CUDATOOLKIT_VERSION=12.4
ARG PYTHON_VERSION=3.11
ARG PYTHON_VERSION=3.12
ARG PYTORCH_VERSION=2.4.0
ARG CONDA_VERSION=4.13.0

Expand Down
2 changes: 1 addition & 1 deletion dockers/release/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

ARG PYTHON_VERSION=3.11
ARG PYTHON_VERSION=3.12
ARG PYTORCH_VERSION=2.4.0
ARG LIGHTNING_VERSION=2.4
ARG CUST_BASE
Expand Down
2 changes: 1 addition & 1 deletion requirements/base.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#lightning>=2.4.0,<2.4.1
# the below is uncommented when master is targeting a specific pl dev master commit
git+https://github.com/Lightning-AI/lightning.git@bf25167bbf64f50ba335aa759318946b21775cd2#egg=lightning
git+https://github.com/Lightning-AI/lightning.git@2064887b12dd934a5f9a2bf45897f29e3bfc74d1#egg=lightning
torch>=2.1.0
#mpmath<1.4.0 # temporary requirement to avoid installation of alpha version of mpmath
6 changes: 4 additions & 2 deletions requirements/pl_adjust_versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@

# IMPORTANT: this list needs to be sorted in reverse
VERSIONS = [
dict(torch="2.4.0", torchvision="0.19.0"), # nightly
dict(torch="2.3.0", torchvision="0.18.0"), # stable
dict(torch="2.5.0", torchvision="0.20.0"), # nightly
dict(torch="2.4.0", torchvision="0.19.0"), # stable
dict(torch="2.3.1", torchvision="0.18.1"),
dict(torch="2.3.0", torchvision="0.18.0"),
dict(torch="2.2.2", torchvision="0.17.2"),
dict(torch="2.2.1", torchvision="0.17.1"),
dict(torch="2.2.0", torchvision="0.17.0"),
Expand Down
2 changes: 1 addition & 1 deletion requirements/standalone_base.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#pytorch-lightning>=2.4.0,<2.4.1
# the below is uncommented when master is targeting a specific pl dev master commit
git+https://github.com/Lightning-AI/pytorch-lightning.git@bf25167bbf64f50ba335aa759318946b21775cd2#egg=pytorch-lightning
git+https://github.com/Lightning-AI/pytorch-lightning.git@2064887b12dd934a5f9a2bf45897f29e3bfc74d1#egg=pytorch-lightning
torch>=2.1.0
#mpmath<1.4.0 # temporary requirement to avoid installation of alpha version of mpmath
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def _setup_args(standalone: bool = False) -> Dict[str, Any]:
"fine-tuning",
"finetuning",
],
python_requires=">=3.8",
python_requires=">=3.9",
setup_requires=[],
extras_require=_prepare_extras(),
project_urls={
Expand All @@ -120,10 +120,10 @@ def _setup_args(standalone: bool = False) -> Dict[str, Any]:
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
],
)

Expand All @@ -135,7 +135,7 @@ def _setup_args(standalone: bool = False) -> Dict[str, Any]:
_INSTALL_PATHS["require"],
file_name=base_reqs,
standalone=standalone,
pl_commit="bf25167bbf64f50ba335aa759318946b21775cd2",
pl_commit="2064887b12dd934a5f9a2bf45897f29e3bfc74d1",
)
base_setup["install_requires"] = install_requires
return base_setup
Expand Down
4 changes: 2 additions & 2 deletions tests/test_fsdp.py
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ def policy(self):
# RunIf aliases
runif_map = {
"min2_2": {"min_torch": "2.2.0"},
"max3_12_min2_2": {"max_python": "3.12", "min_torch": "2.2.0"},
#"max3_12_min2_2": {"max_python": "3.12", "min_torch": "2.2.0"},
}

# auto-wrap policy aliases
Expand Down Expand Up @@ -680,7 +680,7 @@ def policy(self):
),
"cust_awp_noprec_dynamo": (
(nond_loss_adam_model, cust_awp, False, 7, unwrap_7_dyn, None, epoch_t_only, max_epoch_4, None),
"max3_12_min2_2",
"min2_2",
(path_default_orig_eo_dyn, *nones(3)),
),
"cust_awp_mwp_2_1_reinitlr_optim_no_use_orig": (
Expand Down

0 comments on commit bc94a66

Please sign in to comment.