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

add flow for getting executor data when batch size is missing #17772

Merged
merged 1 commit into from
Mar 6, 2020

Conversation

mseth10
Copy link
Contributor

@mseth10 mseth10 commented Mar 5, 2020

Description

Currently we get this error when batch size is missing

[20:57:43] src/nnvm/legacy_json_util.cc:209: Loading symbol saved by previous version v1.3.0. Attempting to upgrade...
[20:57:43] src/nnvm/legacy_json_util.cc:217: Symbol successfully upgraded!
Traceback (most recent call last):
  File "test_wavernn.py", line 26, in <module>
    mod = load_wavernn_model(mx.cpu())
  File "test_wavernn.py", line 17, in load_wavernn_model
    mod.bind(for_training=False, data_shapes=mod_shapes, label_shapes=mod._label_shapes)
  File "/home/ubuntu/.local/lib/python3.5/site-packages/mxnet/module/module.py", line 429, in bind
    state_names=self._state_names)
  File "/home/ubuntu/.local/lib/python3.5/site-packages/mxnet/module/executor_group.py", line 279, in __init__
    self.bind_exec(data_shapes, label_shapes, shared_group)
  File "/home/ubuntu/.local/lib/python3.5/site-packages/mxnet/module/executor_group.py", line 382, in bind_exec
    self._collect_arrays()
  File "/home/ubuntu/.local/lib/python3.5/site-packages/mxnet/module/executor_group.py", line 311, in _collect_arrays
    for name, _ in self.data_shapes]
  File "/home/ubuntu/.local/lib/python3.5/site-packages/mxnet/module/executor_group.py", line 311, in <listcomp>
    for name, _ in self.data_shapes]
  File "/home/ubuntu/.local/lib/python3.5/site-packages/mxnet/module/executor_group.py", line 310, in <listcomp>
    self.data_arrays = [[(self.slices[i], e.arg_dict[name]) for i, e in enumerate(self.execs)]
TypeError: 'NoneType' object is not subscriptable

Checklist

Essentials

Please feel free to remove inapplicable items for your PR.

  • The PR title starts with [MXNET-$JIRA_ID], where $JIRA_ID refers to the relevant JIRA issue created (except PRs with tiny changes)
  • Changes are complete (i.e. I finished coding on this PR)
  • All changes have test coverage:
  • Unit tests are added for small changes to verify correctness (e.g. adding a new operator)
  • Nightly tests are added for complicated/long-running ones (e.g. changing distributed kvstore)
  • Build tests will be added for build configuration changes (e.g. adding a new build option with NCCL)
  • Code is well-documented:
  • For user-facing API changes, API doc string has been updated.
  • For new C++ functions in header files, their functionalities and arguments are documented.
  • For new examples, README.md is added to explain the what the example does, the source of the dataset, expected performance on test set and reference to the original paper if applicable
  • Check the API doc at https://mxnet-ci-doc.s3-accelerate.dualstack.amazonaws.com/PR-$PR_ID/$BUILD_ID/index.html
  • To the best of my knowledge, examples are either not affected by this change, or have been fixed to be compatible with this change

Changes

  • Feature1, tests, (and when applicable, API doc)
  • Feature2, tests, (and when applicable, API doc)

Comments

  • If this change is a backward incompatible change, why must this change be made.
  • Interesting edge cases to note here

@mseth10 mseth10 requested a review from szha as a code owner March 5, 2020 02:59
@mseth10 mseth10 changed the title add logic for no batch size while getting data arrays from executors add flow for getting executor data when batch size is missing Mar 5, 2020
@leezu leezu added the Backport 1.x Pending backport to 1.x label Mar 5, 2020
Copy link
Contributor

@rondogency rondogency left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@rondogency
Copy link
Contributor

rondogency commented Mar 6, 2020

FYI, this PR is for running an audio detection model in module api. I have tested it extensively, and it has full backward compatibility as it keeps existing logic.

@samskalicky @eric-haibin-lin can you take a look and approve this PR?

Copy link
Contributor

@samskalicky samskalicky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@szha szha merged commit d02115f into apache:master Mar 6, 2020
MoisesHer pushed a commit to MoisesHer/incubator-mxnet that referenced this pull request Apr 10, 2020
mseth10 added a commit to mseth10/incubator-mxnet that referenced this pull request Apr 15, 2020
@mseth10 mseth10 mentioned this pull request Apr 15, 2020
7 tasks
mseth10 added a commit to mseth10/incubator-mxnet that referenced this pull request Apr 16, 2020
@mseth10 mseth10 mentioned this pull request Apr 21, 2020
7 tasks
TaoLv pushed a commit that referenced this pull request Apr 23, 2020
pengzhao-intel pushed a commit that referenced this pull request Apr 26, 2020
anirudh2290 pushed a commit to anirudh2290/mxnet that referenced this pull request May 29, 2020
@mseth10 mseth10 deleted the fix_slicing branch June 1, 2020 10:48
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Backport 1.x Pending backport to 1.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants