Skip to content

Commit

Permalink
Merge pull request #3639 from yunchu/mergeback/2.0.0
Browse files Browse the repository at this point in the history
Mergeback 2.0.0 to develop
  • Loading branch information
yunchu authored Jun 20, 2024
2 parents c4c980a + 8af2d12 commit d96ea1c
Show file tree
Hide file tree
Showing 22 changed files with 1,403 additions and 50 deletions.
12 changes: 6 additions & 6 deletions .ci/requirements/benchmark/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -171,12 +171,12 @@ fonttools==4.53.0 \
ipykernel==6.29.4 \
--hash=sha256:1181e653d95c6808039c509ef8e67c4126b3b3af7781496c7cbfb5ed938a27da \
--hash=sha256:3d44070060f9475ac2092b760123fadf105d2e2493c24848b6691a7c4f42af5c
# via -r .ci/requirements/benchmark/requirements.in
# via -r ./benchmark/requirements.in
ipython==8.23.0 \
--hash=sha256:07232af52a5ba146dc3372c7bf52a0f890a23edf38d77caef8d53f9cdc2584c1 \
--hash=sha256:7468edaf4f6de3e1b912e57f66c241e6fd3c7099f2ec2136e239e142e800274d
# via
# -r .ci/requirements/benchmark/requirements.in
# -r ./benchmark/requirements.in
# ipykernel
jedi==0.19.1 \
--hash=sha256:cf0496f3651bc65d7174ac1b7d043eff454892c708a87d1b683e57b569927ffd \
Expand Down Expand Up @@ -412,7 +412,7 @@ matplotlib==3.8.4 \
--hash=sha256:ecd79298550cba13a43c340581a3ec9c707bd895a6a061a78fa2524660482fc0 \
--hash=sha256:f51c4c869d4b60d769f7b4406eec39596648d9d70246428745a681c327a8ad30 \
--hash=sha256:fb44f53af0a62dc80bba4443d9b27f2fde6acfdac281d95bc872dc148a6509cc
# via -r .ci/requirements/benchmark/requirements.in
# via -r ./benchmark/requirements.in
matplotlib-inline==0.1.7 \
--hash=sha256:8423b23ec666be3d16e16b60bdd8ac4e86e840ebd1dd11a30b9f117f2fa0ab90 \
--hash=sha256:df192d39a4ff8f21b1895d72e6a13f5fcc5099f00fa84384e0ea28c2cc0653ca
Expand All @@ -430,7 +430,7 @@ nbclient==0.10.0 \
nbconvert==7.16.3 \
--hash=sha256:a6733b78ce3d47c3f85e504998495b07e6ea9cf9bf6ec1c98dda63ec6ad19142 \
--hash=sha256:ddeff14beeeedf3dd0bc506623e41e4507e551736de59df69a91f86700292b3b
# via -r .ci/requirements/benchmark/requirements.in
# via -r ./benchmark/requirements.in
nbformat==5.10.4 \
--hash=sha256:322168b14f937a5d11362988ecac2a4952d3d8e3a2cbeb2319584631226d5b3a \
--hash=sha256:3b48d6c8fbca4b299bf3982ea7db1af21580e4fec269ad087b9e81588891200b
Expand Down Expand Up @@ -485,7 +485,7 @@ numpy==1.26.4 \
openpyxl==3.1.2 \
--hash=sha256:a6f5977418eff3b2d5500d54d9db50c8277a368436f4e4f8ddb1be3422870184 \
--hash=sha256:f91456ead12ab3c6c2e9491cf33ba6d08357d802192379bb482f1033ade496f5
# via -r .ci/requirements/benchmark/requirements.in
# via -r ./benchmark/requirements.in
packaging==24.0 \
--hash=sha256:2ddfb553fdf02fb784c234c7ba6ccc288296ceabec964ad2eae3777778130bc5 \
--hash=sha256:eb82c5e3e56209074766e6885bb04b8c38a0c015d0a30036ebe7ece34c9989e9
Expand Down Expand Up @@ -523,7 +523,7 @@ pandas==2.2.2 \
--hash=sha256:ddf818e4e6c7c6f4f7c8a12709696d193976b591cc7dc50588d3d1a6b5dc8772 \
--hash=sha256:e9b79011ff7a0f4b1d6da6a61aa1aa604fb312d6647de5bad20013682d1429ce \
--hash=sha256:eee3a87076c0756de40b05c5e9a6069c035ba43e8dd71c379e68cab2c20f16ad
# via -r .ci/requirements/benchmark/requirements.in
# via -r ./benchmark/requirements.in
pandocfilters==1.5.1 \
--hash=sha256:002b4a555ee4ebc03f8b66307e287fa492e4a77b4ea14d3f934328297bb4939e \
--hash=sha256:93be382804a9cdb0a7267585f157e5d1731bbe5545a85b268d6f5fe6232de2bc
Expand Down
29 changes: 10 additions & 19 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,8 @@ on:
permissions: read-all

jobs:
build_wheels:
name: Build wheels
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Build wheels
uses: pypa/cibuildwheel@ba8be0d98853f5744f24e7f902c8adef7ae2e7f3 # v2.18.1
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: artifact-wheels
path: ./wheelhouse/*.whl

build_sdist:
name: Build source distribution
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -40,15 +27,22 @@ jobs:
with:
name: artifact-sdist
path: dist/*.tar.gz
- name: Build wheel
run: python -m build --wheel
- uses: actions/upload-artifact@1746f4ab65b179e0ea60a494b83293b640dd5bba # v4.3.2
with:
name: artifact-wheel
path: dist/*.whl

publish_package:
name: Publish package
needs: [build_wheels, build_sdist]
needs: [build]
environment: pypi
runs-on: ubuntu-latest
permissions:
packages: write
contents: write
id-token: write
steps:
- name: Download artifacts
uses: actions/download-artifact@87c55149d96e628cc2ef7e6fc2aab372015aec85 # v4.1.3
Expand All @@ -75,12 +69,9 @@ jobs:
- name: Publish package distributions to PyPI
if: ${{ steps.check-tag.outputs.match != '' }}
uses: pypa/gh-action-pypi-publish@ec4db0b4ddc65acdf4bff5fa45ac92d78b56bdf0 # v1.9.0
with:
password: ${{ secrets.PYPI_API_TOKEN }}
- name: Publish package distributions to TestPyPI
if: ${{ steps.check-tag.outputs.match == '' }}
uses: pypa/gh-action-pypi-publish@ec4db0b4ddc65acdf4bff5fa45ac92d78b56bdf0 # v1.9.0
with:
password: ${{ secrets.TESTPYPI_API_TOKEN }}
repository-url: https://test.pypi.org/legacy/
verbose: true
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,35 @@ All notable changes to this project will be documented in this file.

### Enhancements

## \[v2.0.0\]

> _**NOTES**_
>
> OpenVINO™ Training Extensions which version 2.0.0 has been updated to include refactoring of the overall architecture and functional updates. Users should [install the new environment](https://openvinotoolkit.github.io/training_extensions/latest/guide/get_started/installation.html).
### New features

- Enable New design to provide a more seamless API/CLI that delivers the value of OTX: [Product Design](https://openvinotoolkit.github.io/training_extensions/latest/guide/explanation/product_design.html)
- Moved away from MMLab's libraries to provide a Lightning-based core and training pipeline
- Use Lightning-based modules and trainers to deliver APIs/CLIs in a more user-friendly way
- Support Intel devices for accelerating deep learning model training

### Enhancements

- Support more models for each task
- Improve the API so user can configure efficient training with shorter code
- Provide more customize settings through the CLI and API
- Enhance the Auto-Configuration feature and made it available in the API

### Bug fixes

- Fixing some minor issues

### Known issues

- Anomaly task processing times have increased compared with v1.\* version, with anomaly classification experiencing a slowdown of approximately 26%, anomaly detection by approximately 213%, and anomaly segmentation by approximately 78%. [Issue #3592](https://github.com/openvinotoolkit/training_extensions/issues/3592)
- Post-Training Quantization (PTQ) optimization applied to `maskrcnn_swint` in the instance segmentation task may result in significantly reduced accuracy compared with v1.\* [Issue #3593](https://github.com/openvinotoolkit/training_extensions/issues/3593)

## \[v1.6.1\]

### Enhancements
Expand Down
22 changes: 19 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,23 @@ In addition to the examples above, please refer to the documentation for tutoria

### v2.0.0 (1Q24)

TBD
### New features

- Enable New design to provide a more seamless API/CLI that delivers the value of OTX: [Product Design](https://openvinotoolkit.github.io/training_extensions/latest/guide/explanation/product_design.html)
- Moved away from MMLab's libraries to provide a Lightning-based core and training pipeline
- Use Lightning-based modules and trainers to deliver APIs/CLIs in a more user-friendly way
- Support Intel devices for accelerating deep learning model training

### Enhancements

- Support more models for each task
- Improve the API so user can configure efficient training with shorter code
- Provide more customize settings through the CLI and API
- Enhance the Auto-Configuration feature and made it available in the API

### Bug fixes

- Fixing some issues

### Release History

Expand Down Expand Up @@ -224,8 +240,8 @@ Please use [Issues](https://github.com/openvinotoolkit/training_extensions/issue

## Known limitations

[misc](https://github.com/openvinotoolkit/training_extensions/tree/misc) branch contains training, evaluation, and export scripts for models based on TensorFlow and PyTorch.
These scripts are not ready for production. They are exploratory and have not been validated.
- [misc](https://github.com/openvinotoolkit/training_extensions/tree/misc) branch contains training, evaluation, and export scripts for models based on TensorFlow and PyTorch.
These scripts are not ready for production. They are exploratory and have not been validated.

---

Expand Down
29 changes: 29 additions & 0 deletions docs/source/guide/release_notes/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,35 @@ Releases
v2.0.0 (2Q24)
-------------

.. note::
OpenVINO™ Training Extensions which version 2.0.0 has been updated to include refactoring of the overall
architecture and functional updates. Users should [install the new environment](https://openvinotoolkit.github.io/training_extensions/latest/guide/get_started/installation.html).

New features
^^^^^^^^^^^^
- Enable New design to provide a more seamless API/CLI that delivers the value of OTX: [Product Design](https://openvinotoolkit.github.io/training_extensions/latest/guide/explanation/product_design.html)
- Moved away from MMLab's libraries to provide a Lightning-based core and training pipeline
- Use Lightning-based modules and trainers to deliver APIs/CLIs in a more user-friendly way
- Support Intel devices for accelerating deep learning model training

Enhancements
^^^^^^^^^^^^
- Support more models for each task
- Improve the API so user can configure efficient training with shorter code
- Provide more customize settings through the CLI and API
- Enhance the Auto-Configuration feature and made it available in the API

Bug fixes
^^^^^^^^^
- Fixing some minor issues

Known issues
^^^^^^^^^^^^
- Anomaly task processing times have increased compared with v1.\* version, with anomaly classification experiencing a slowdown of approximately 26%, anomaly detection by approximately 213%, and anomaly segmentation by approximately 78%.
(https://github.com/openvinotoolkit/training_extensions/issues/3592)
- Post-Training Quantization (PTQ) optimization applied to `maskrcnn_swint` in the instance segmentation task may result in significantly reduced accuracy compared with v1.\*
(https://github.com/openvinotoolkit/training_extensions/issues/3593)

v1.6.1 (2024.05)
----------------

Expand Down
15 changes: 6 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
requires = [
"setuptools>=61",
"wheel",
"Cython~=0.29.32",
]
build-backend = "setuptools.build_meta"

Expand Down Expand Up @@ -39,6 +38,8 @@ dependencies = [
"rich_argparse==1.5.2", # CLI help-formatter
"einops==0.7.0",
"decord==0.6.0",
# TODO(ashwinvaidya17): https://github.com/openvinotoolkit/anomalib/issues/2126
"setuptools<70",
]

[project.optional-dependencies]
Expand Down Expand Up @@ -74,7 +75,7 @@ xpu = [
"torchvision==0.16.0.post2",
"intel-extension-for-pytorch==2.1.30+xpu",
"oneccl_bind_pt==2.1.300+xpu",
"lightning==2.1.2",
"lightning==2.2",
"pytorchcv",
"timm",
"openvino==2024.0",
Expand All @@ -83,8 +84,9 @@ xpu = [
"onnx==1.16.0",
"onnxconverter-common==1.14.0",
"nncf==2.9.0",
"anomalib[core]==1.0.1",
"anomalib[core]==1.1.0",
]

base = [
"torch==2.1.1",
"lightning==2.2",
Expand Down Expand Up @@ -126,11 +128,6 @@ include-package-data = true
where = ["src"]
include = ["otx*"]

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# CI CONFIGURATION. #
[tool.cibuildwheel]
build = "cp39-manylinux_x86_64 cp310-manylinux_x86_64 cp311-manylinux_x86_64"


# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# COVERAGE CONFIGURATION. #
Expand Down Expand Up @@ -164,6 +161,7 @@ omit = [
"src/otx/core/model/utils/*",
]


# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# MYPY CONFIGURATION. #
[tool.mypy]
Expand All @@ -172,7 +170,6 @@ ignore_missing_imports = true
show_error_codes = true



# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# RUFF CONFIGURATION #
[tool.ruff]
Expand Down
2 changes: 1 addition & 1 deletion src/otx/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Copyright (C) 2023 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

__version__ = "2.0.0rc0"
__version__ = "2.0.0"

from otx.core.types import * # noqa: F403

Expand Down
2 changes: 1 addition & 1 deletion src/otx/algo/detection/atss.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def __init__(
torch_compile=torch_compile,
tile_config=tile_config,
)
self.image_size = (1, 3, 736, 992)
self.image_size = (1, 3, 800, 992)
self.tile_image_size = self.image_size

def _create_model(self) -> nn.Module:
Expand Down
6 changes: 3 additions & 3 deletions src/otx/recipe/detection/atss_mobilenetv2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ overrides:
- class_path: otx.core.data.transform_libs.torchvision.Resize
init_args:
scale:
- 736
- 800
- 992
keep_ratio: false
transform_bbox: true
Expand All @@ -83,7 +83,7 @@ overrides:
- class_path: otx.core.data.transform_libs.torchvision.Resize
init_args:
scale:
- 736
- 800
- 992
keep_ratio: false
transform_bbox: false
Expand All @@ -103,7 +103,7 @@ overrides:
- class_path: otx.core.data.transform_libs.torchvision.Resize
init_args:
scale:
- 736
- 800
- 992
keep_ratio: false
transform_bbox: false
Expand Down
6 changes: 3 additions & 3 deletions src/otx/recipe/detection/atss_mobilenetv2_tile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ overrides:
- class_path: otx.core.data.transform_libs.torchvision.Resize
init_args:
scale:
- 736
- 800
- 992
keep_ratio: false
transform_bbox: true
Expand All @@ -80,7 +80,7 @@ overrides:
- class_path: otx.core.data.transform_libs.torchvision.Resize
init_args:
scale:
- 736
- 800
- 992
keep_ratio: false
transform_bbox: false
Expand All @@ -100,7 +100,7 @@ overrides:
- class_path: otx.core.data.transform_libs.torchvision.Resize
init_args:
scale:
- 736
- 800
- 992
keep_ratio: false
transform_bbox: false
Expand Down
6 changes: 3 additions & 3 deletions src/otx/recipe/detection/atss_resnext101.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ overrides:
- class_path: otx.core.data.transform_libs.torchvision.Resize
init_args:
scale:
- 736
- 800
- 992
keep_ratio: false
transform_bbox: true
Expand All @@ -83,7 +83,7 @@ overrides:
- class_path: otx.core.data.transform_libs.torchvision.Resize
init_args:
scale:
- 736
- 800
- 992
keep_ratio: false
transform_bbox: false
Expand All @@ -103,7 +103,7 @@ overrides:
- class_path: otx.core.data.transform_libs.torchvision.Resize
init_args:
scale:
- 736
- 800
- 992
keep_ratio: false
transform_bbox: false
Expand Down
Loading

0 comments on commit d96ea1c

Please sign in to comment.