Skip to content

Commit

Permalink
Merge branch 'develop' into api_add
Browse files Browse the repository at this point in the history
  • Loading branch information
vshampor authored Apr 13, 2023
2 parents 946a017 + e1fac72 commit 57c82b8
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 15 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/api_changes_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,12 @@ jobs:
id: diff
run: |
cd html_build/html/$API_DOC_HTML_ROOT_RELATIVE_PATH
find . -name "*.html" -exec diff -qrBZ {} $GITHUB_WORKSPACE/previous_doc_state/$API_DOC_HTML_ROOT_RELATIVE_PATH/{} \;
echo "changed_files=$(find . -name "*.html" -exec diff -qrBZ {} $GITHUB_WORKSPACE/previous_doc_state/$API_DOC_HTML_ROOT_RELATIVE_PATH/{} \;)" >> $GITHUB_OUTPUT
- uses: actions-ecosystem/action-add-labels@v1
if: ${{ steps.diff.outputs }} != ""
if: ${{ steps.diff.outputs.changed_files }} != ""
with:
labels: API
- uses: actions-ecosystem/action-remove-labels@v1
if: ${{ steps.diff.outputs.changed_files }} == ""
with:
labels: API
1 change: 0 additions & 1 deletion nncf/onnx/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
from nncf.common.engine import Engine
from nncf.common.api_marker import api

@api()
class ONNXEngine(Engine):
"""
Engine for ONNX backend using ONNXRuntime to infer the model.
Expand Down
2 changes: 1 addition & 1 deletion nncf/torch/automl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
"""
2 changes: 1 addition & 1 deletion nncf/torch/automl/agent/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
"""
2 changes: 1 addition & 1 deletion nncf/torch/automl/agent/ddpg/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
"""
18 changes: 10 additions & 8 deletions nncf/torch/model_creation.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,20 +151,22 @@ def create_nncf_network(model: torch.nn.Module,
the internal graph representation via tracing. Specifying this is useful when the original training pipeline
has special formats of data loader output or has additional *forward* arguments other than input tensors.
Otherwise, the *forward* call of the model during graph tracing will be made with mock tensors according
to the shape specified in the config object. The dummy_forward_fn code MUST contain calls to nncf.nncf_model_input
to the shape specified in the config object. The dummy_forward_fn code MUST contain calls to
nncf.nncf_model_input
functions made with each compressed model input tensor in the underlying model's args/kwargs tuple, and these
calls should be exactly the same as in the wrap_inputs_fn function code (see below); if dummy_forward_fn is
specified, then wrap_inputs_fn also must be specified.
:param wrap_inputs_fn: if supplied, will be used on the module's input arguments during a regular, non-dummy
forward call before passing the inputs to the underlying compressed model. This is required if the model's input
tensors that are important for compression are not supplied as arguments to the model's forward call directly, but
instead are located in a container (such as list), and the model receives the container as an argument.
tensors that are important for compression are not supplied as arguments to the model's forward call directly,
but instead are located in a container (such as list), and the model receives the container as an argument.
wrap_inputs_fn should take as input two arguments - the tuple of positional arguments to the underlying
model's forward call, and a dict of keyword arguments to the same. The function should wrap each tensor among the
supplied model's args and kwargs that is important for compression (e.g. quantization) with an nncf.nncf_model_input
function, which is a no-operation function and marks the tensors as inputs to be traced by NNCF in the internal
graph representation. Output is the tuple of (args, kwargs), where args and kwargs are the same as were supplied in
input, but each tensor in the original input. Must be specified if dummy_forward_fn is specified.
model's forward call, and a dict of keyword arguments to the same. The function should wrap each tensor among
the supplied model's args and kwargs that is important for compression (e.g. quantization) with an
nncf.nncf_model_input function, which is a no-operation function and marks the tensors as inputs to be traced
by NNCF in the internal graph representation. Output is the tuple of (args, kwargs), where args and kwargs are
the same as were supplied in input, but each tensor in the original input. Must be specified if
dummy_forward_fn is specified.
:param wrap_outputs_fn: if supplied, will be used on the module's output during a regular, non-dummy forward call.
:return: A model wrapped by NNCFNetwork, which is ready for adding compression. """

Expand Down
2 changes: 1 addition & 1 deletion nncf/torch/statistics/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
"""

0 comments on commit 57c82b8

Please sign in to comment.