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

[clojure-package] fix docstrings in normal.clj #14295

Merged
merged 1 commit into from
Mar 5, 2019
Merged

[clojure-package] fix docstrings in normal.clj #14295

merged 1 commit into from
Mar 5, 2019

Conversation

Chouffe
Copy link
Contributor

@Chouffe Chouffe commented Mar 1, 2019

Description

  • Added spec to catch high < low in uniform
  • Added spec to catch scale <= 0 in normal
  • Added unit tests

Checklist

Essentials

Please feel free to remove inapplicable items for your PR.

  • [x ] 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

  • 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

@Chouffe Chouffe requested a review from gigasquid as a code owner March 1, 2019 14:28
@gigasquid
Copy link
Member

Thanks for your contribution @Chouffe. I look forward to reviewing it shortly 😸

Copy link
Member

@gigasquid gigasquid 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 improvements! Looks great 💯

`ctx`: Context of output ndarray, will use default context if not specified.
`out`: Output place holder}
returns: The result ndarray with generated result.
Ex:
Copy link
Member

Choose a reason for hiding this comment

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

Examples in the docstring are very nice 💯

note: The random number generator of mxnet is by default device specific.
This means if you set the same seed, the random number sequence
generated from GPU0 can be different from CPU."
generated from GPU0 can be different from CPU.
Ex:
Copy link
Member

Choose a reason for hiding this comment

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

😍

@gigasquid
Copy link
Member

It is good to go once the CI tests pass

@Chouffe
Copy link
Contributor Author

Chouffe commented Mar 1, 2019

The main issue was in the docstring for normal + some extra specs for uniform

`loc`: Mean (centre) of the distribution.
`scale`: Standard deviation (spread or width) of the distribution.

@Chouffe
Copy link
Contributor Author

Chouffe commented Mar 2, 2019

Not sure why CI has not run?

@anirudhacharya
Copy link
Member

@mxnet-label-bot add [pr-awaiting-merge, Clojure]

@marcoabreu marcoabreu added Clojure pr-awaiting-merge Review and CI is complete. Ready to Merge labels Mar 4, 2019
@gigasquid
Copy link
Member

@Chouffe would you mind pushing an empty commit or something to retrigger the CI? I think it might be fixed now

* Fixed documentation string in `normal` function
* Added spec to catch `high` < `low` in `uniform`
* Added spec to catch `scale` <= 0 in `normal`
* Added unit tests
@Chouffe
Copy link
Contributor Author

Chouffe commented Mar 5, 2019

I just rebased on upstream master and pushed again :)

@Chouffe
Copy link
Contributor Author

Chouffe commented Mar 5, 2019

It seems to be green @gigasquid :-)

@gigasquid gigasquid merged commit 0f88f61 into apache:master Mar 5, 2019
@gigasquid
Copy link
Member

Yay! thanks

vdantu pushed a commit to vdantu/incubator-mxnet that referenced this pull request Mar 31, 2019
* Fixed documentation string in `normal` function
* Added spec to catch `high` < `low` in `uniform`
* Added spec to catch `scale` <= 0 in `normal`
* Added unit tests
haohuanw pushed a commit to haohuanw/incubator-mxnet that referenced this pull request Jun 23, 2019
* Fixed documentation string in `normal` function
* Added spec to catch `high` < `low` in `uniform`
* Added spec to catch `scale` <= 0 in `normal`
* Added unit tests
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Clojure pr-awaiting-merge Review and CI is complete. Ready to Merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants