diff --git a/.actions/requirements.txt b/.actions/requirements.txt index fdd60050f2..a19661dbae 100644 --- a/.actions/requirements.txt +++ b/.actions/requirements.txt @@ -1,2 +1,2 @@ -jsonargparse>=4.16.0 +jsonargparse >=4.16.0, <4.28.0 requests diff --git a/.github/actions/pip-wheels/action.yml b/.github/actions/pip-wheels/action.yml index 3defc33643..28d6e346b7 100644 --- a/.github/actions/pip-wheels/action.yml +++ b/.github/actions/pip-wheels/action.yml @@ -19,7 +19,7 @@ runs: using: "composite" steps: - name: install dev. env - run: pip install setuptools wheel + run: pip install -r requirements/ci.txt shell: bash - name: Freeze local emv. diff --git a/.github/actions/pkg-check/action.yml b/.github/actions/pkg-check/action.yml index ce8c327969..83bdcd3089 100644 --- a/.github/actions/pkg-check/action.yml +++ b/.github/actions/pkg-check/action.yml @@ -14,7 +14,7 @@ runs: using: "composite" steps: - name: install dev. env - run: pip install "twine==4.0.1" setuptools wheel flake8 + run: pip install -r requirements/ci.txt shell: bash - name: Set PACKAGE_NAME envvar diff --git a/.github/workflows/_legacy-checkpoints.yml b/.github/workflows/_legacy-checkpoints.yml index b0aaf78d06..6adcbf5045 100644 --- a/.github/workflows/_legacy-checkpoints.yml +++ b/.github/workflows/_legacy-checkpoints.yml @@ -110,6 +110,7 @@ jobs: path: ${{ env.legacy_dir }}/checkpoints/ retention-days: ${{ env.KEEP_DAYS }} + - run: pip install -r requirements/ci.txt - name: Upload checkpoints to S3 working-directory: ${{ env.legacy_dir }} env: @@ -117,7 +118,6 @@ jobs: AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_PUB_SECRET_KEY }} AWS_DEFAULT_REGION: ${{ secrets.AWS_REGION }} run: | - pip install -q awscli aws s3 sync $AWS_RUN checkpoints/ s3://pl-public-data/legacy/checkpoints/ zip -r checkpoints.zip checkpoints aws s3 cp $AWS_RUN checkpoints.zip s3://pl-public-data/legacy/ --acl public-read diff --git a/.github/workflows/ci-checkpoints.yml b/.github/workflows/ci-checkpoints.yml index 1f0cde9b6f..020d02dba9 100644 --- a/.github/workflows/ci-checkpoints.yml +++ b/.github/workflows/ci-checkpoints.yml @@ -9,6 +9,7 @@ on: paths: - ".github/workflows/ci-checkpoints.yml" - ".github/workflows/_legacy-checkpoints.yml.yml" + - "requirements/ci.txt" jobs: try-legacy-checkpoints: diff --git a/.github/workflows/ci-pkg-install.yml b/.github/workflows/ci-pkg-install.yml index 261c07b0d7..993e264332 100644 --- a/.github/workflows/ci-pkg-install.yml +++ b/.github/workflows/ci-pkg-install.yml @@ -9,6 +9,7 @@ on: types: [opened, reopened, ready_for_review, synchronize] # added `ready_for_review` since draft is skipped paths: - ".actions/*" + - "requirements/ci.txt" - ".github/actions/pkg-check/*" - ".github/actions/pkg-install/*" - ".github/workflows/_build-packages.yml" diff --git a/.github/workflows/ci-tests-app.yml b/.github/workflows/ci-tests-app.yml index 79bd396005..2b1740a04a 100644 --- a/.github/workflows/ci-tests-app.yml +++ b/.github/workflows/ci-tests-app.yml @@ -10,6 +10,7 @@ on: paths: - ".actions/*" - ".github/workflows/ci-tests-app.yml" + - "requirements/ci.txt" - "src/lightning/app/**" - "src/lightning_app/*" - "tests/tests_app/**" @@ -91,7 +92,6 @@ jobs: - name: Install package & dependencies timeout-minutes: 20 run: | - python -m pip install -q pip -U pip install -e ".[${EXTRA_PREFIX}dev]" -U --prefer-binary \ --find-links="${TORCH_URL}" --find-links="${PYPI_CACHE_DIR}" pip list diff --git a/.github/workflows/ci-tests-data.yml b/.github/workflows/ci-tests-data.yml index baf37c2794..0ad603ca17 100644 --- a/.github/workflows/ci-tests-data.yml +++ b/.github/workflows/ci-tests-data.yml @@ -9,6 +9,7 @@ on: types: [opened, reopened, ready_for_review, synchronize] # added `ready_for_review` since draft is skipped paths: - ".actions/*" + - "requirements/ci.txt" - "requirements/data/**" - "src/lightning/data/**" - "src/lightning/__init__.py" @@ -69,7 +70,7 @@ jobs: - name: Adjust PyTorch versions in requirements files if: ${{ matrix.requires != 'oldest' && matrix.release != 'pre' }} run: | - pip install -q wget packaging + pip install -q -r requirements/ci.txt python -m wget https://raw.githubusercontent.com/Lightning-AI/utilities/main/scripts/adjust-torch-versions.py for fpath in `ls requirements/data/*.txt`; do \ python ./adjust-torch-versions.py $fpath ${{ matrix.pytorch-version }}; \ @@ -88,7 +89,6 @@ jobs: - name: Install package & dependencies timeout-minutes: 20 run: | - python -m pip install -q pip -U pip install -e ".[data-dev]" -U --prefer-binary -f ${TORCH_URL} pip list diff --git a/.github/workflows/ci-tests-fabric.yml b/.github/workflows/ci-tests-fabric.yml index 0a142bdea8..e32ebcf3ba 100644 --- a/.github/workflows/ci-tests-fabric.yml +++ b/.github/workflows/ci-tests-fabric.yml @@ -9,6 +9,7 @@ on: types: [opened, reopened, ready_for_review, synchronize] # added `ready_for_review` since draft is skipped paths: - ".actions/*" + - "requirements/ci.txt" - "requirements/fabric/**" - "src/lightning/fabric/**" - "src/lightning_fabric/*" @@ -109,7 +110,7 @@ jobs: - name: Adjust PyTorch versions in requirements files if: ${{ matrix.requires != 'oldest' }} run: | - pip install -q wget packaging + pip install -q -r requirements/ci.txt python -m wget https://raw.githubusercontent.com/Lightning-AI/utilities/main/scripts/adjust-torch-versions.py for fpath in `ls requirements/**/*.txt`; do \ python ./adjust-torch-versions.py $fpath ${{ matrix.pytorch-version }}; \ @@ -136,7 +137,6 @@ jobs: - name: Install package & dependencies timeout-minutes: 20 run: | - #python -m pip install -q pip -U pip install -e ".[${EXTRA_PREFIX}test,${EXTRA_PREFIX}strategies]" -U --prefer-binary \ --find-links="${TORCH_URL}" --find-links="${PYPI_CACHE_DIR}" pip list diff --git a/.github/workflows/ci-tests-pytorch.yml b/.github/workflows/ci-tests-pytorch.yml index 57ec482ee1..c3d2aacb8c 100644 --- a/.github/workflows/ci-tests-pytorch.yml +++ b/.github/workflows/ci-tests-pytorch.yml @@ -9,6 +9,7 @@ on: types: [opened, reopened, ready_for_review, synchronize] # added `ready_for_review` since draft is skipped paths: - ".actions/*" + - "requirements/ci.txt" - "requirements/pytorch/**" - "src/lightning/pytorch/**" - "src/pytorch_lightning/*" @@ -114,7 +115,7 @@ jobs: - name: Adjust PyTorch versions in requirements files if: ${{ matrix.requires != 'oldest' }} run: | - pip install -q wget packaging + pip install -q -r requirements/ci.txt python -m wget https://raw.githubusercontent.com/Lightning-AI/utilities/main/scripts/adjust-torch-versions.py for fpath in `ls requirements/**/*.txt`; do \ python ./adjust-torch-versions.py $fpath ${{ matrix.pytorch-version }}; \ @@ -142,7 +143,6 @@ jobs: - name: Install package & dependencies timeout-minutes: 20 run: | - #python -m pip install -q pip -U pip install ".[${EXTRA_PREFIX}extra,${EXTRA_PREFIX}test,${EXTRA_PREFIX}strategies]" -U --prefer-binary \ -r requirements/_integrations/accelerators.txt \ --find-links="${TORCH_URL}" --find-links="${PYPI_CACHE_DIR}" diff --git a/.github/workflows/ci-tests-store.yml b/.github/workflows/ci-tests-store.yml index c9bb6d8ebc..5a34a1243b 100644 --- a/.github/workflows/ci-tests-store.yml +++ b/.github/workflows/ci-tests-store.yml @@ -9,6 +9,7 @@ on: types: [opened, reopened, ready_for_review, synchronize] # added `ready_for_review` since draft is skipped paths: - ".actions/*" + - "requirements/ci.txt" - "requirements/store/**" - "src/lightning/__init__.py" - "src/lightning/__setup__.py" @@ -57,7 +58,7 @@ jobs: - name: Adjust PyTorch versions in requirements files if: ${{ matrix.requires != 'oldest' && matrix.release != 'pre' }} run: | - pip install -q wget packaging + pip install -q -r requirements/ci.txt python -m wget https://raw.githubusercontent.com/Lightning-AI/utilities/main/scripts/adjust-torch-versions.py for fpath in `ls requirements/store/*.txt`; do \ python ./adjust-torch-versions.py $fpath ${{ matrix.pytorch-version }}; \ @@ -66,7 +67,6 @@ jobs: - name: Install package & dependencies timeout-minutes: 20 run: | - python -m pip install -q pip -U pip install -e ".[store,store-test]" -U -f ${TORCH_URL} --prefer-binary pip list diff --git a/.github/workflows/docs-build.yml b/.github/workflows/docs-build.yml index a81a4f6f01..a9785cb548 100644 --- a/.github/workflows/docs-build.yml +++ b/.github/workflows/docs-build.yml @@ -11,6 +11,7 @@ on: paths: - ".actions/*" - ".github/workflows/docs-build.yml" + - "requirements/ci.txt" - "docs/**" - "_notebooks" - "requirements/**" @@ -74,7 +75,7 @@ jobs: - name: Pull sphinx template run: | - pip install awscli + pip install -q -r requirements/ci.txt aws s3 sync --no-sign-request s3://sphinx-packages/ ${PYPI_LOCAL_DIR} pip install lai-sphinx-theme -U -f ${PYPI_LOCAL_DIR} diff --git a/.github/workflows/release-pkg.yml b/.github/workflows/release-pkg.yml index 5abda9d7e7..d2d60bbc29 100644 --- a/.github/workflows/release-pkg.yml +++ b/.github/workflows/release-pkg.yml @@ -10,6 +10,7 @@ on: branches: [master, "release/*"] types: [opened, reopened, ready_for_review, synchronize] paths: + - "requirements/ci.txt" - ".github/actions/pkg-publish/*" - ".github/workflows/_legacy-checkpoints.yml.yml" - ".github/workflows/_build-packages.yml" diff --git a/requirements/ci.txt b/requirements/ci.txt new file mode 100644 index 0000000000..08c2bd4114 --- /dev/null +++ b/requirements/ci.txt @@ -0,0 +1,6 @@ +setuptools +wheel +awscli >=1.30.0, <1.31.0 +twine ==4.0.1 +wget +packaging