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

Fixing unintentional variable overloading #14438

Merged
merged 11 commits into from
Apr 3, 2019
Merged

Fixing unintentional variable overloading #14438

merged 11 commits into from
Apr 3, 2019

Conversation

zjost
Copy link
Contributor

@zjost zjost commented Mar 15, 2019

Description

In the recommender example, the for loop uses i for enumeration, but then i is also used within the loop for list comprehensions, which breaks their utility. Instead of being an integer, i becomes an mx.nd.array

resolves #14439

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 http:https://mxnet-ci-doc.s3-accelerate.dualstack.amazonaws.com/PR-$PR_ID/$BUILD_ID/index.html
  • To the my best knowledge, examples are either not affected by this change, or have been fixed to be compatible with this change

Changes

  • Changed from symbol i to idx in loop within matrix_fact.evaluate_network
  • Changed from symbol i to idx in loop within matrix_fact.train

Comments

@zjost zjost requested a review from szha as a code owner March 15, 2019 19:39
@zjost zjost changed the title Fixing unintentional variable overloading [MXNET-14439] Fixing unintentional variable overloading Mar 15, 2019
@zjost zjost changed the title [MXNET-14439] Fixing unintentional variable overloading Fixing unintentional variable overloading Mar 15, 2019
Copy link
Member

@szha szha left a comment

Choose a reason for hiding this comment

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

thanks for the fix and welcome to mxnet. would you mind also adding an entry for yourself in https://github.com/apache/incubator-mxnet/blob/master/CONTRIBUTORS.md#list-of-contributors

@zjost
Copy link
Contributor Author

zjost commented Mar 15, 2019

Done, thanks!

@karan6181
Copy link
Contributor

@mxnet-label-bot add [Example, Bug, Python, pr-awaiting-testing]

@marcoabreu marcoabreu added Bug Example pr-awaiting-testing PR is reviewed and waiting CI build and test Python labels Mar 15, 2019
@karan6181
Copy link
Contributor

@zjost Thank you for your contribution!

Could you please look into the CI test failure? Thanks!

@zjost
Copy link
Contributor Author

zjost commented Mar 18, 2019

Looks like something related to a clojure artifact. This should have nothing to do with my changes.

@zachgk
Copy link
Contributor

zachgk commented Mar 19, 2019

@zjost Cool trick: If you edit the PR description and add resolves #14439, then it will automatically resolve the issue when the PR is merged (https://help.github.com/en/articles/closing-issues-using-keywords). Otherwise, it is good to at least mention the issue from the PR.

Your PR is breaking on the clojure test due to an unrelated issue (#14448). You should rebase your commit onto master (git pull --rebase) so the fix to that issue is applied to your commit. It should pass the CI after that

@zjost
Copy link
Contributor Author

zjost commented Mar 19, 2019

The command '/bin/sh -c /work/ubuntu_publish.sh' returned a non-zero code: 100

@anirudh2290
Copy link
Member

@zjost you can push an empty commit to retrigger the test. also can you rebase the latest master onto your branch.

@zjost
Copy link
Contributor Author

zjost commented Mar 21, 2019

If the code leading to the test failures is already in master, what's the harm of merging my rather innocuous changes to the example? Presumably the code I'm needing to rebase against is failing the same tests.

@szha szha changed the base branch from master to numpy April 3, 2019 04:09
@szha szha changed the base branch from numpy to master April 3, 2019 04:09
@szha szha merged commit 6478691 into apache:master Apr 3, 2019
ZhennanQin pushed a commit to ZhennanQin/incubator-mxnet that referenced this pull request Apr 3, 2019
* Fixing unintentional variable overloading

* Adding to conbributor list

* Fixing unintentional variable overloading

* Adding to conbributor list

* Fixing unintentional variable overloading

* Adding to conbributor list

* Fixing unintentional variable overloading

* Adding to conbributor list
@zjost
Copy link
Contributor Author

zjost commented Apr 3, 2019

Sweet, thanks!

@szha
Copy link
Member

szha commented Apr 3, 2019

@zjost thanks for the patch!

nswamy pushed a commit that referenced this pull request Apr 5, 2019
* Fixing unintentional variable overloading

* Adding to conbributor list

* Fixing unintentional variable overloading

* Adding to conbributor list

* Fixing unintentional variable overloading

* Adding to conbributor list

* Fixing unintentional variable overloading

* Adding to conbributor list
haohuanw pushed a commit to haohuanw/incubator-mxnet that referenced this pull request Jun 23, 2019
* Fixing unintentional variable overloading

* Adding to conbributor list

* Fixing unintentional variable overloading

* Adding to conbributor list

* Fixing unintentional variable overloading

* Adding to conbributor list

* Fixing unintentional variable overloading

* Adding to conbributor list
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Example pr-awaiting-testing PR is reviewed and waiting CI build and test Python
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Recommender example is broken
6 participants