Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Commit

Permalink
Merge pull request #2 from KonstantinKorotaev/PyTorchLightning-master
Browse files Browse the repository at this point in the history
Py torch lightning master
  • Loading branch information
KonstantinKorotaev authored Aug 23, 2021
2 parents e995d8c + 33958d0 commit 9a0d919
Show file tree
Hide file tree
Showing 400 changed files with 17,528 additions and 5,062 deletions.
2 changes: 1 addition & 1 deletion .azure-pipelines/gpu-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
# ToDo: this need to have installed docker in the base image...
#container: "pytorchlightning/pytorch_lightning:base-cuda-py$[ variables['python.version'] ]-torch1.6"
container:
image: "pytorchlightning/pytorch_lightning:base-cuda-py3.8-torch1.7"
image: "pytorchlightning/pytorch_lightning:base-cuda-py3.8-torch1.8"
#endpoint: azureContainerRegistryConnection
options: "--ipc=host --runtime=nvidia -e NVIDIA_VISIBLE_DEVICES=all"

Expand Down
4 changes: 0 additions & 4 deletions .deepsource.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,3 @@ enabled = true
[analyzers.meta]
runtime_version = "3.x.x"
max_line_length = 120

[[transformers]]
name = "autopep8"
enabled = true
14 changes: 7 additions & 7 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# the repo. Unless a later match takes precedence,
# @global-owner1 and @global-owner2 will be requested for
# review when someone opens a pull request.
* @ethanwharris @borda @tchaton @justusschock @carmocca @kaushikb11
* @ethanwharris @borda @tchaton @ananyahjha93 @justusschock @carmocca @kaushikb11

# owners
/.github/CODEOWNERS @williamfalcon
Expand All @@ -17,12 +17,12 @@
/__init__.py @borda @ethanwharris

# CI/CD
/.github/workflows/ @borda @ethanwharris
/.github/workflows/ @borda @ethanwharris @ananyahjha93
# configs in root
/*.yml @borda @ethanwharris
/*.yml @borda @ethanwharris @ananyahjha93

# Docs
/docs/ @edenlightning @ethanwharris
/.github/*.md @edenlightning @ethanwharris
/.github/ISSUE_TEMPLATE/*.md @edenlightning @ethanwharris
/docs/source/conf.py @borda @ethanwharris
/docs/ @edenlightning @ethanwharris @ananyahjha93
/.github/*.md @edenlightning @ethanwharris @ananyahjha93
/.github/ISSUE_TEMPLATE/*.md @edenlightning @ethanwharris @ananyahjha93
/docs/source/conf.py @borda @ethanwharris @ananyahjha93
54 changes: 41 additions & 13 deletions .github/workflows/ci-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,32 +19,52 @@ jobs:
os: [ubuntu-20.04, macOS-10.15, windows-2019]
python-version: [3.6, 3.8]
requires: ['minimal', 'latest']
topic: ['devel']
topic: [['devel']]
include:
- os: ubuntu-20.04
python-version: 3.8
requires: 'latest'
topic: 'image'
topic: ['image']
- os: ubuntu-20.04
python-version: 3.8
requires: 'minimal'
topic: 'image'
topic: ['image']
- os: ubuntu-20.04
python-version: 3.8
requires: 'latest'
topic: 'video'
topic: ['image','image_extras']
- os: ubuntu-20.04
python-version: 3.8
requires: 'latest'
topic: 'tabular'
topic: ['video']
- os: ubuntu-20.04
python-version: 3.8
requires: 'latest'
topic: 'text'
topic: ['video','video_extras']
- os: ubuntu-20.04
python-version: 3.8
requires: 'latest'
topic: 'serve'
topic: ['tabular']
- os: ubuntu-20.04
python-version: 3.8
requires: 'latest'
topic: ['text']
- os: ubuntu-20.04
python-version: 3.8
requires: 'latest'
topic: ['pointcloud']
- os: ubuntu-20.04
python-version: 3.8
requires: 'latest'
topic: ['serve']
- os: ubuntu-20.04
python-version: 3.8
requires: 'latest'
topic: ['graph']
- os: ubuntu-20.04
python-version: 3.8
requires: 'latest'
topic: ['audio']

# Timeout: https://stackoverflow.com/a/59076067/4521646
timeout-minutes: 35
Expand All @@ -64,7 +84,7 @@ jobs:
brew install libomp # https://github.com/pytorch/pytorch/issues/20030
- name: Install graphviz
if: matrix.topic == 'serve'
if: matrix.topic[0] == 'serve'
run: |
sudo apt-get install graphviz
Expand Down Expand Up @@ -93,24 +113,32 @@ jobs:
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.topic }}-${{ matrix.requires }}-pip-${{ hashFiles('requirements.txt') }}
key: ${{ runner.os }}-${{ matrix.python-version }}-${{ join(matrix.topic,'-') }}-${{ matrix.requires }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.topic }}-${{ matrix.requires }}-pip-
${{ runner.os }}-${{ matrix.python-version }}-${{ join(matrix.topic,'-') }}-${{ matrix.requires }}-pip-
- name: Install dependencies
run: |
python --version
pip --version
pip install '.[${{ matrix.topic }}]' --pre --upgrade --find-links https://download.pytorch.org/whl/cpu/torch_stable.html
pip install torch>=1.8
pip install '.[${{ join(matrix.topic,',') }}]' --pre --upgrade --find-links https://download.pytorch.org/whl/cpu/torch_stable.html
pip install '.[test]' --pre --upgrade
pip list
shell: bash

- name: Install serve test dependencies
if: matrix.topic == 'serve'
if: matrix.topic[0] == 'serve'
run: |
pip install '.[all]' --pre --upgrade
- name: Install audio test dependencies
if: matrix.topic[0] == 'audio'
run: |
sudo apt-get install libsndfile1
pip install matplotlib
pip install '.[audio,image]' --pre --upgrade
- name: Cache datasets
uses: actions/cache@v2
with:
Expand All @@ -120,7 +148,7 @@ jobs:

- name: Tests
env:
FLASH_TEST_TOPIC: ${{ matrix.topic }}
FLASH_TEST_TOPIC: ${{ join(matrix.topic,',') }}
FIFTYONE_DO_NOT_TRACK: true
run: |
# tox --sitepackages
Expand Down
30 changes: 0 additions & 30 deletions .github/workflows/code-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,36 +23,6 @@ jobs:
- name: PEP8
run: flake8 .

#format-check-yapf:
# runs-on: ubuntu-20.04
# steps:
# - uses: actions/checkout@master
# - uses: actions/setup-python@v2
# with:
# python-version: 3.8
# - name: Install dependencies
# run: |
# pip install --upgrade pip
# pip install yapf
# pip list
# shell: bash
# - name: yapf
# run: yapf --diff --parallel --recursive .

#imports-check-isort:
# runs-on: ubuntu-20.04
# steps:
# - uses: actions/checkout@master
# - uses: actions/setup-python@v2
# with:
# python-version: 3.8
# - name: Install isort
# run: |
# pip install isort
# pip list
# - name: isort
# run: isort --check-only .

#typing-check-mypy:
# runs-on: ubuntu-20.04
# steps:
Expand Down
17 changes: 0 additions & 17 deletions .github/workflows/docs-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,6 @@ on: # Trigger the workflow on push or pull request, but only for the master bran
branches: [master]

jobs:
sphinx-docs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: ammaraskar/sphinx-action@master
with:
# git is required to clone the docs theme
# before custom requirement are resolved https://github.com/ammaraskar/sphinx-action/issues/16
pre-build-command: "apt-get update -y && apt-get install -y gcc git pandoc && pip install . && pip install -r ./requirements/docs.txt"
docs-folder: "docs/"
repo-token: "${{ secrets.GITHUB_TOKEN }}"
- uses: actions/upload-artifact@v2
with:
name: docs-results-${{ github.sha }}
path: docs/build/html/


make-docs:
runs-on: ubuntu-20.04

Expand Down
14 changes: 12 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@ instance/

# Sphinx documentation
docs/_build/
docs/api/
docs/notebooks/
docs/source/api/generated/
docs/source/integrations/generated/
docs/source/generated/

# PyBuilder
target/
Expand Down Expand Up @@ -133,8 +138,6 @@ dmypy.json
# Pyre type checker
.pyre/

docs/notebooks/
docs/api/
titanic.csv
.vscode
.venv
Expand All @@ -143,6 +146,7 @@ data_folder
*.zip
flash_notebooks/*.py
flash_notebooks/data
/data
MNIST*
titanic
hymenoptera_data
Expand All @@ -157,3 +161,9 @@ CameraRGB
CameraSeg
jigsaw_toxic_comments
flash_examples/serve/tabular_classification/data
logs/cache/*
flash_examples/data
flash_examples/checkpoints
timit/
urban8k_images/
__MACOSX
42 changes: 30 additions & 12 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,28 +34,46 @@ repos:
- id: check-added-large-files
- id: detect-private-key

- repo: https://github.com/asottile/pyupgrade
rev: v2.23.0
hooks:
- id: pyupgrade
args: [--py36-plus]
name: Upgrade code

- repo: https://github.com/PyCQA/isort
rev: 5.9.1
rev: 5.9.3
hooks:
- id: isort
name: imports
require_serial: false

- repo: https://github.com/pre-commit/mirrors-yapf
rev: v0.31.0
- repo: https://github.com/kynan/nbstripout
rev: 0.5.0
hooks:
- id: yapf
name: formatting
language: python
require_serial: false
- id: nbstripout

- repo: https://github.com/myint/docformatter
rev: v1.4
hooks:
- id: docformatter
args: [--in-place, --wrap-summaries=115, --wrap-descriptions=120]

- repo: https://github.com/psf/black
rev: 21.7b0
hooks:
- id: black
name: Format code

- repo: https://github.com/asottile/blacken-docs
rev: v1.10.0
hooks:
- id: blacken-docs
args: [ --line-length=120 ]
additional_dependencies: [ black==21.7b0 ]

- repo: https://github.com/PyCQA/flake8
rev: 3.9.2
hooks:
- id: flake8
name: PEP8

- repo: https://github.com/kynan/nbstripout
rev: 0.5.0
hooks:
- id: nbstripout
60 changes: 58 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,73 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).

- Added support for (input, target) style datasets (e.g. torchvision) to the from_datasets method ([#552](https://github.com/PyTorchLightning/lightning-flash/pull/552))

- Added support for `from_csv` and `from_data_frame` to `ImageClassificationData` ([#556](https://github.com/PyTorchLightning/lightning-flash/pull/556))

- Added SimCLR, SwAV, Barlow-twins pretrained weights for resnet50 backbone in ImageClassifier task ([#560](https://github.com/PyTorchLightning/lightning-flash/pull/560))

- Added support for Semantic Segmentation backbones and heads from `segmentation-models.pytorch` ([#562](https://github.com/PyTorchLightning/lightning-flash/pull/562))

- Added support for nesting of `Task` objects ([#575](https://github.com/PyTorchLightning/lightning-flash/pull/575))

- Added `PointCloudSegmentation` Task ([#566](https://github.com/PyTorchLightning/lightning-flash/pull/566))

- Added `PointCloudObjectDetection` Task ([#600](https://github.com/PyTorchLightning/lightning-flash/pull/600))

- Added a `GraphClassifier` task ([#73](https://github.com/PyTorchLightning/lightning-flash/pull/73))

- Added the option to pass `pretrained` as a string to `SemanticSegmentation` to change pretrained weights to load from `segmentation-models.pytorch` ([#587](https://github.com/PyTorchLightning/lightning-flash/pull/587))

- Added support for `field` parameter for loadng JSON based datasets in text tasks. ([#585](https://github.com/PyTorchLightning/lightning-flash/pull/585))

- Added `AudioClassificationData` and an example for classifying audio spectrograms ([#594](https://github.com/PyTorchLightning/lightning-flash/pull/594))

- Added a `SpeechRecognition` task for speech to text using Wav2Vec ([#586](https://github.com/PyTorchLightning/lightning-flash/pull/586))

- Added Flash Zero, a zero code command line ML platform built with flash ([#611](https://github.com/PyTorchLightning/lightning-flash/pull/611))

- Added support for `.npy` and `.npz` files to `ImageClassificationData` and `AudioClassificationData` ([#651](https://github.com/PyTorchLightning/lightning-flash/pull/651))

- Added support for `from_csv` to the `AudioClassificationData` ([#651](https://github.com/PyTorchLightning/lightning-flash/pull/651))

- Added option to pass a `resolver` to the `from_csv` and `from_pandas` methods of `ImageClassificationData`, which is used to resolve filenames given IDs ([#651](https://github.com/PyTorchLightning/lightning-flash/pull/651))

- Added integration with IceVision for the `ObjectDetector` ([#608](https://github.com/PyTorchLightning/lightning-flash/pull/608))

- Added keypoint detection task ([#608](https://github.com/PyTorchLightning/lightning-flash/pull/608))

- Added instance segmentation task ([#608](https://github.com/PyTorchLightning/lightning-flash/pull/608))

- Added Torch ORT support to Transformer based tasks ([#667](https://github.com/PyTorchLightning/lightning-flash/pull/667))

- Added support for flash zero with the `InstanceSegmentation` and `KeypointDetector` tasks ([#672](https://github.com/PyTorchLightning/lightning-flash/pull/672))

- Added support for `in_chans` argument to the flash ResNet to control the expected number of input channels ([#673](https://github.com/PyTorchLightning/lightning-flash/pull/673))

### Changed

- Changed how pretrained flag works for loading weights for ImageClassifier task ([#560](https://github.com/PyTorchLightning/lightning-flash/pull/560))

### Deprecated
- Removed bolts pretrained weights for SSL from ImageClassifier task ([#560](https://github.com/PyTorchLightning/lightning-flash/pull/560))

- Changed the behaviour of the `sampler` argument of the `DataModule` to take a `Sampler` type rather than instantiated object ([#651](https://github.com/PyTorchLightning/lightning-flash/pull/651))

### Fixed
- Changed arguments to `ObjectDetector`, use `head` instead of `model` and append `_fpn` to the backbone name instead of the `fpn` argument ([#608](https://github.com/PyTorchLightning/lightning-flash/pull/608))

### Fixed

- Fixed a bug where serve sanity checking would not be triggered using the latest PyTorchLightning version ([#493](https://github.com/PyTorchLightning/lightning-flash/pull/493))

- Fixed a bug where train and validation metrics weren't being correctly computed ([#559](https://github.com/PyTorchLightning/lightning-flash/pull/559))

- Fixed a bug where an uncaught ValueError could be raised when checking if a module is available ([#615](https://github.com/PyTorchLightning/lightning-flash/pull/615))

- Fixed a bug where some tasks were not compatible with PyTorch 1.7 due to use of `torch.jit.isinstance` ([#611](https://github.com/PyTorchLightning/lightning-flash/pull/611))

- Fixed a bug where custom samplers would not be properly forwarded to the data loader ([#651](https://github.com/PyTorchLightning/lightning-flash/pull/651))

- Fixed a bug where it was not possible to pass no metrics to the `ImageClassifier` or `TestClassifier` ([#660](https://github.com/PyTorchLightning/lightning-flash/pull/660))

- Fixed a bug where `drop_last` would be set to True during prediction and testing ([#671](https://github.com/PyTorchLightning/lightning-flash/pull/671))

## [0.4.0] - 2021-06-22

Expand Down
Loading

0 comments on commit 9a0d919

Please sign in to comment.