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

Move otx.mpa.modules.ov -> otx.core.ov #1929

Merged
Merged
Show file tree
Hide file tree
Changes from 7 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
2 changes: 1 addition & 1 deletion docs/source/guide/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Guide

reference/api/index
reference/algorithm/index
reference/core/data
reference/core/index
reference/hpo/hpo
reference/mpa/index

Expand Down
8 changes: 8 additions & 0 deletions docs/source/guide/reference/core/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Core
====

.. toctree::
:maxdepth: 1

data
ov/index
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ Graph
:maxdepth: 3
:caption: Contents:

.. automodule:: otx.mpa.modules.ov.graph
.. automodule:: otx.core.ov.graph
:members:
:undoc-members:

.. automodule:: otx.mpa.modules.ov.graph.graph
.. automodule:: otx.core.ov.graph.graph
:members:
:undoc-members:

.. automodule:: otx.mpa.modules.ov.graph.utils
.. automodule:: otx.core.ov.graph.utils
:members:
:undoc-members:

.. automodule:: otx.mpa.modules.ov.graph.parsers
.. automodule:: otx.core.ov.graph.parsers
:members:
:undoc-members:
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ OpenVINO
models
ops

.. automodule:: otx.mpa.modules.ov
.. automodule:: otx.core.ov
:members:
:undoc-members:

.. automodule:: otx.mpa.modules.ov.omz_wrapper
.. automodule:: otx.core.ov.omz_wrapper
:members:
:undoc-members:

.. automodule:: otx.mpa.modules.ov.registry
.. automodule:: otx.core.ov.registry
:members:
:undoc-members:

.. automodule:: otx.mpa.modules.ov.utils
.. automodule:: otx.core.ov.utils
:members:
:undoc-members:
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ Models
:maxdepth: 3
:caption: Contents:

.. automodule:: otx.mpa.modules.ov.models
.. automodule:: otx.core.ov.models
:members:
:undoc-members:

.. automodule:: otx.mpa.modules.ov.models.mmov_model
.. automodule:: otx.core.ov.models.mmov_model
:members:
:undoc-members:

.. automodule:: otx.mpa.modules.ov.models.ov_model
.. automodule:: otx.core.ov.models.ov_model
:members:
:undoc-members:

.. automodule:: otx.mpa.modules.ov.models.parser_mixin
.. automodule:: otx.core.ov.models.parser_mixin
:members:
:undoc-members:
82 changes: 82 additions & 0 deletions docs/source/guide/reference/core/ov/ops.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
OPS
^^^

.. toctree::
:maxdepth: 3
:caption: Contents:

.. automodule:: otx.core.ov.ops
:members:
:undoc-members:

.. automodule:: otx.core.ov.ops.activations
:members:
:undoc-members:

.. automodule:: otx.core.ov.ops.arithmetics
:members:
:undoc-members:

.. automodule:: otx.core.ov.ops.builder
:members:
:undoc-members:

.. automodule:: otx.core.ov.ops.convolutions
:members:
:undoc-members:

.. automodule:: otx.core.ov.ops.generation
:members:
:undoc-members:

.. automodule:: otx.core.ov.ops.image_processings
:members:
:undoc-members:

.. automodule:: otx.core.ov.ops.infrastructures
:members:
:undoc-members:

.. automodule:: otx.core.ov.ops.matmuls
:members:
:undoc-members:

.. automodule:: otx.core.ov.ops.movements
:members:
:undoc-members:

.. automodule:: otx.core.ov.ops.normalizations
:members:
:undoc-members:

.. automodule:: otx.core.ov.ops.object_detections
:members:
:undoc-members:

.. automodule:: otx.core.ov.ops.op
:members:
:undoc-members:

.. automodule:: otx.core.ov.ops.poolings
:members:
:undoc-members:

.. automodule:: otx.core.ov.ops.reductions
:members:
:undoc-members:

.. automodule:: otx.core.ov.ops.shape_manipulations
:members:
:undoc-members:

.. automodule:: otx.core.ov.ops.sorting_maximization
:members:
:undoc-members:

.. automodule:: otx.core.ov.ops.type_conversions
:members:
:undoc-members:

.. automodule:: otx.core.ov.ops.utils
:members:
:undoc-members:
1 change: 0 additions & 1 deletion docs/source/guide/reference/mpa/modules/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@ Modules

models/index
datasets
ov/index
utils
82 changes: 0 additions & 82 deletions docs/source/guide/reference/mpa/modules/ov/ops.rst

This file was deleted.

3 changes: 0 additions & 3 deletions docs/source/guide/reference/mpa/utils.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ Utils
:members:
:undoc-members:

.. automodule:: otx.mpa.utils.file
:members:
:undoc-members:

.. automodule:: otx.mpa.utils.mo_wrapper
:members:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
"""Module for the MMOVBackbone class."""

from typing import Dict, List
from typing import Dict, List, Union

from mmcls.models.builder import BACKBONES

from otx.mpa.modules.ov.graph.parsers.cls.cls_base_parser import cls_base_parser
from otx.mpa.modules.ov.models.mmov_model import MMOVModel
from otx.core.ov.graph.parsers.cls import cls_base_parser
from otx.core.ov.models.mmov_model import MMOVModel


@BACKBONES.register_module()
Expand All @@ -18,7 +18,7 @@ class MMOVBackbone(MMOVModel):
"""

@staticmethod
def parser(graph, **kwargs) -> Dict[str, List[str]]:
def parser(graph, **kwargs) -> Dict[str, Union[List[str], Dict[str, List[str]]]]:
"""Parses the input and output of the model.

Args:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
from mmcls.models.builder import HEADS
from mmcls.models.heads import ClsHead

from otx.mpa.modules.ov.graph.parsers.cls.cls_base_parser import cls_base_parser
from otx.mpa.modules.ov.models.mmov_model import MMOVModel
from otx.core.ov.graph.parsers.cls import cls_base_parser
from otx.core.ov.models.mmov_model import MMOVModel


@HEADS.register_module()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
# SPDX-License-Identifier: Apache-2.0
#

from typing import Dict, List
from typing import Dict, List, Union

from mmcls.models.builder import NECKS

from otx.mpa.modules.ov.graph.parsers.cls.cls_base_parser import cls_base_parser
from otx.mpa.modules.ov.models.mmov_model import MMOVModel
from otx.core.ov.graph.parsers.cls import cls_base_parser
from otx.core.ov.models.mmov_model import MMOVModel


@NECKS.register_module()
Expand All @@ -19,7 +19,7 @@ def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)

@staticmethod
def parser(graph, **kwargs) -> Dict[str, List[str]]:
def parser(graph, **kwargs) -> Dict[str, Union[List[str], Dict[str, List[str]]]]:
"""Parser function returns base_parser for given graph."""
output = cls_base_parser(graph, "neck")
if output is None:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from mmdet.models.builder import BACKBONES

from otx.mpa.modules.ov.models.mmov_model import MMOVModel
from otx.core.ov.models.mmov_model import MMOVModel


@BACKBONES.register_module()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from mmdet.models.builder import HEADS
from mmdet.models.dense_heads.rpn_head import RPNHead

from otx.mpa.modules.ov.models.mmov_model import MMOVModel
from otx.core.ov.models.mmov_model import MMOVModel
from otx.mpa.utils.logger import get_logger

logger = get_logger()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from mmdet.models.builder import HEADS
from mmdet.models.dense_heads.ssd_head import SSDHead

from otx.mpa.modules.ov.models.mmov_model import MMOVModel
from otx.core.ov.models.mmov_model import MMOVModel

# TODO: Need to fix pylint issues
# pylint: disable=redefined-argument-from-local, too-many-instance-attributes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from mmdet.models.builder import HEADS
from mmdet.models.dense_heads.yolo_head import YOLOV3Head

from otx.mpa.modules.ov.models.mmov_model import MMOVModel
from otx.core.ov.models.mmov_model import MMOVModel

# TODO: Need to fix pylint issues
# pylint: disable=too-many-instance-attributes, keyword-arg-before-vararg
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from mmdet.models.necks.fpn import FPN
from torch import nn

from otx.mpa.modules.ov.models.mmov_model import MMOVModel
from otx.core.ov.models.mmov_model import MMOVModel

# TODO: Need to fix pylint issues
# pylint: disable=keyword-arg-before-vararg, too-many-locals
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from mmdet.models.builder import NECKS
from torch import nn

from otx.mpa.modules.ov.models.mmov_model import MMOVModel
from otx.core.ov.models.mmov_model import MMOVModel

# pylint: disable=too-many-arguments, too-many-locals

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
from mmdet.models.builder import NECKS
from mmdet.models.necks.yolo_neck import YOLOV3Neck

from otx.mpa.modules.ov.models.mmov_model import MMOVModel
from otx.mpa.modules.ov.models.parser_mixin import ParserMixin
from otx.core.ov.models.mmov_model import MMOVModel
from otx.core.ov.models.parser_mixin import ParserMixin # type: ignore[attr-defined]


@NECKS.register_module()
Expand Down
Loading