Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resolve CI status [wip] #1099

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 13 additions & 10 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,26 @@ assignees: ''

### To Reproduce

Steps to reproduce the behavior:

1. Go to '...'
1. Run '....'
1. Scroll down to '....'
1. See error
Steps to reproduce the behavior...

<!-- If you have a code sample, error messages, stack traces, please provide it here as well -->

#### Code sample
<details>
<summary>Code sample</summary>

```python
# Ideally attach a minimal code sample to reproduce the decried issue.
# Minimal means having the shortest code but still preserving the bug.
```

<!-- Ideally attach a minimal code sample to reproduce the decried issue.
Minimal means having the shortest code but still preserving the bug. -->
</details>

### Expected behavior

<!-- A clear and concise description of what you expected to happen. -->

### Environment
<details>
<summary>Environment</summary>

- PyTorch Version (e.g., 1.0):
- OS (e.g., Linux):
Expand All @@ -41,6 +42,8 @@ Minimal means having the shortest code but still preserving the bug. -->
- GPU models and configuration:
- Any other relevant information:

</details>

### Additional context

<!-- Add any other context about the problem here. -->
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Ask a Question
url: https://github.com/Lightning-Universe/lightning-bolts/discussions/new
about: Ask and answer TorchMetrics related questions
- name: 💬 Chat with us
url: https://discord.gg/VptPCZkGNa
about: Live chat with experts, engineers, and users in our Discord community.
5 changes: 2 additions & 3 deletions .github/ISSUE_TEMPLATE/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ assignees: ''

For typos and doc fixes, please go ahead and:

1. Create an issue.
1. Fix the typo.
1. Submit a PR.
- For a simple typo or fix, please send directly a PR (no need to create an issue)
- If you are not sure about the proper solution, please describe here your finding...

Thanks!
30 changes: 0 additions & 30 deletions .github/ISSUE_TEMPLATE/how-to-question.md

This file was deleted.

23 changes: 13 additions & 10 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
<details>
<summary><b>Before submitting</b></summary>

- [ ] Was this **discussed/approved** via a Github issue? (no need for typos and docs improvements)
- [ ] Did you read the [contributor guideline](https://github.com/PyTorchLightning/lightning-bolts/blob/master/.github/CONTRIBUTING.md), Pull Request section?
- [ ] Did you make sure your PR does **only one thing**, instead of bundling different changes together?
- [ ] Did you make sure to **update the documentation** with your changes?
- [ ] Did you write any **new necessary tests**? \[not needed for typos/docs\]
- [ ] Did you verify new and **existing tests** pass locally with your changes?
- [ ] If you made a notable change (that affects users), did you update the [CHANGELOG](https://github.com/PyTorchLightning/lightning-bolts/blob/master/CHANGELOG.md)?

</details>

## What does this PR do?

<!--
Expand All @@ -8,16 +21,6 @@ Please include a summary of the change and which issue is fixed.

Fixes # (issue)

## Before submitting

- [ ] Was this **discussed/approved** via a Github issue? (no need for typos and docs improvements)
- [ ] Did you read the [contributor guideline](https://github.com/PyTorchLightning/lightning-bolts/blob/master/.github/CONTRIBUTING.md), Pull Request section?
- [ ] Did you make sure your PR does **only one thing**, instead of bundling different changes together?
- [ ] Did you make sure to **update the documentation** with your changes?
- [ ] Did you write any **new necessary tests**? \[not needed for typos/docs\]
- [ ] Did you verify new and **existing tests** pass locally with your changes?
- [ ] If you made a notable change (that affects users), did you update the [CHANGELOG](https://github.com/PyTorchLightning/lightning-bolts/blob/master/CHANGELOG.md)?

<!-- For CHANGELOG separate each item in unreleased section by a blank line to reduce collisions -->

## PR review
Expand Down
33 changes: 33 additions & 0 deletions .github/actions/download-ROM/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Prepare env. / restore caches
description: some more complex download-ROM - pip & hf

runs:
using: "composite"
steps:

- name: Setup macOS
if: runner.os == 'macOS'
run: |
brew update
brew install rar
shell: bash
- name: Setup Ubuntu
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y unrar
shell: bash
- name: Setup Windows
if: runner.os == 'Windows'
run: |
choco install unrar
shell: bash

- name: Download ROMs
run: |
mkdir -p _datasets
cd _datasets
curl http://www.atarimania.com/roms/Roms.rar -o Roms.rar
unrar x -y Roms.rar
rm Roms.rar
shell: bash
11 changes: 0 additions & 11 deletions .github/labeler.yml

This file was deleted.

19 changes: 19 additions & 0 deletions .github/labeling-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
documentation:
- changed-files:
- any-glob-to-any-file:
- docs/**/*

callback:
- changed-files:
- any-glob-to-any-file:
- pl_bolts/callbacks/**/*

datamodule:
- changed-files:
- any-glob-to-any-file:
- pl_bolts/datamodules/**/*

model:
- changed-files:
- any-glob-to-any-file:
- pl_bolts/models/**/*
2 changes: 1 addition & 1 deletion .github/workflows/ci-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ jobs:
import-name: "pl_bolts"
testing-matrix: |
{
"os": ["ubuntu-20.04", "macos-11", "windows-2022"],
"os": ["ubuntu-22.04", "macos-13", "windows-2022"],
"python-version": ["3.8"]
}
62 changes: 13 additions & 49 deletions .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ jobs:
strategy:
fail-fast: false
matrix:
os: ["ubuntu-20.04", "macOS-11"]
os: ["ubuntu-22.04", "macOS-13"]
python-version: ["3.8", "3.9", "3.10"]
requires: ["latest"] # + "oldest"
include:
- { os: 'windows-2022', python-version: "3.9" }
- { os: 'ubuntu-20.04', python-version: "3.8", requires: "oldest" }
- { os: 'macOS-11', python-version: "3.8", requires: "oldest" }
- { os: 'macOS-13', python-version: "3.8", requires: "oldest" }
env:
FREEZE_REQUIREMENTS: 1
TORCH_URL: "https://download.pytorch.org/whl/cpu/torch_stable.html"
Expand All @@ -42,6 +42,7 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip"

- name: Set min. dependencies
if: matrix.requires == 'oldest'
Expand All @@ -53,15 +54,11 @@ jobs:
open(fpath, 'w').write(req)
shell: python

- name: Get pip cache dir
id: pip-cache
run: echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
- name: Restore pip cache
uses: actions/cache/restore@v4
id: restore-cache
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: pip-dependencies
- name: Setup macOS
if: runner.os == 'macOS'
run: |
brew update
brew install swig

- name: Install package
run: |
Expand All @@ -84,13 +81,6 @@ jobs:
pip install -r requirements/devel.txt -U -q -f ${TORCH_URL}
pip list

- name: Save pip cache
if: github.ref == 'refs/heads/master'
uses: actions/cache/save@v4
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: pip-dependencies

- name: Cache datasets
id: cache-datasets
uses: actions/cache@v4
Expand All @@ -100,52 +90,26 @@ jobs:
# bump this date if you need update cache
key: datasets-20230630

- name: Setup macOS
if: runner.os == 'macOS' && steps.cache-datasets.outputs.cache-hit != 'true'
run: |
brew update
brew install rar
- name: Setup Ubuntu
if: runner.os == 'Linux'&& steps.cache-datasets.outputs.cache-hit != 'true'
run: |
sudo apt-get update
sudo apt-get install -y unrar
- name: Setup Windows
if: runner.os == 'Windows'&& steps.cache-datasets.outputs.cache-hit != 'true'
run: |
choco install unrar

- name: Download ROMs
if: steps.cache-datasets.outputs.cache-hit != 'true'
run: |
mkdir -p _datasets
cd _datasets
curl http://www.atarimania.com/roms/Roms.rar -o Roms.rar
unrar x -y Roms.rar
rm Roms.rar
continue-on-error: true
uses: ./.github/actions/download-ROM

- name: Init ROMs
continue-on-error: true
working-directory: _datasets/
run: python -m atari_py.import_roms ROMS

- name: Restore HF cache
uses: actions/cache/restore@v4
- name: HF cache
uses: actions/cache@v4
with:
path: ${{ env.TRANSFORMERS_CACHE }}
key: cache-transformers

- name: Testing
run: python -m pytest tests -v --cov=pl_bolts --timeout=200

- name: Save HF cache
if: github.ref == 'refs/heads/master'
uses: actions/cache/save@v4
with:
path: ${{ env.TRANSFORMERS_CACHE }}
key: cache-transformers

- name: Statistics
if: success()
run: |
coverage report
coverage xml
Expand Down
23 changes: 14 additions & 9 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
name: Labeler

on:
pull_request_target:
types: [opened, reopened]
name: "Pull Request Labeler"
on: [pull_request_target]

jobs:
triage:
triage-prs:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@main
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
# Uploads repository content to the runner
- uses: actions/checkout@v4
- uses: actions/labeler@v5
with:
# The path to the label configuration file.
configuration-path: .github/labeling-config.yml
# Whether removing labels when matching files are reverted or no longer changed by the PR
sync-labels: true
2 changes: 1 addition & 1 deletion src/pl_bolts/callbacks/data_monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def _is_logger_available(self, logger: Logger) -> bool:
if not isinstance(logger, self.supported_loggers):
rank_zero_warn(
f"{self.__class__.__name__} does not support logging with {logger.__class__.__name__}."
f" Supported loggers are: {', '.join((str(x.__name__) for x in self.supported_loggers))}"
f" Supported loggers are: {', '.join(str(x.__name__) for x in self.supported_loggers)}"
)
available = False
return available
Expand Down
Loading