-
Notifications
You must be signed in to change notification settings - Fork 6.8k
[MXNET-624] Clojure Package Api Docs for the Website #11574
Conversation
- get rid of getting started since it shows up in codox docs
@aaronmarkham Here is a start on the Clojure API docs for the website. Feedback is welcome. |
I'm trying to figure out what the docs pipeline is missing. Can you help @nswamy @larroy ?
The command |
I am not sure if you got a chance to review this document written by @aaronmarkham https://github.com/apache/incubator-mxnet/tree/master/docs. Right now Scala docs are generated using a Python script here: https://github.com/apache/incubator-mxnet/blob/master/docs/mxdoc.py#L81. You might have to create your own method in this script to execute |
Thanks - I'll take a look at trying to run the docs locally and get the script working with the clojure package later this weekend |
Yay! the docs pipeline is green now - clojuredocs are being built and included. |
this is cool, thanks @gigasquid. i'll await @aaronmarkham to take a quick look and merge after. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are great overall. I have some minor suggestions for formatting and clarity. I'll also need to follow-up with a test build to make sure the dependencies on the build are all working.
docs/api/clojure/module.md
Outdated
@@ -0,0 +1,235 @@ | |||
# Module API | |||
The module API provides an intermediate and high-level interface for performing computation with neural networks in MXNet. Module wraps a Symbol and one or more Executors. It has both a high level and intermediate level api. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Second API all caps.
contrib/clojure-package/doc/intro.md
Outdated
@@ -4,9 +4,8 @@ A clojure package to the MXNet Deep Learning library | |||
|
|||
## Introduction | |||
|
|||
MXNet is a first class, modern deep learning library that AWS has officially picked as its chosen library. It supports multiple languages on a first class basis and is incubating as an Apache project. | |||
MXNet is a first class, modern deep learning library. It supports multiple languages on a first class basis and is incubating as an Apache project. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this need repeating deep in the project?
contrib/clojure-package/doc/intro.md
Outdated
@@ -4,9 +4,8 @@ A clojure package to the MXNet Deep Learning library | |||
|
|||
## Introduction | |||
|
|||
MXNet is a first class, modern deep learning library that AWS has officially picked as its chosen library. It supports multiple languages on a first class basis and is incubating as an Apache project. | |||
MXNet is a first class, modern deep learning library. It supports multiple languages on a first class basis and is incubating as an Apache project. | |||
|
|||
The motivation for creating a Clojure package is to be able to open the deep learning library to the Clojure ecosystem and build bridges for future development and innovation for the community. It provides all the needed tools including low level and high level apis, dynamic graphs, and things like GAN and natural language support. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
low-level and high-level APIs
contrib/clojure-package/doc/intro.md
Outdated
@@ -4,9 +4,8 @@ A clojure package to the MXNet Deep Learning library | |||
|
|||
## Introduction | |||
|
|||
MXNet is a first class, modern deep learning library that AWS has officially picked as its chosen library. It supports multiple languages on a first class basis and is incubating as an Apache project. | |||
MXNet is a first class, modern deep learning library. It supports multiple languages on a first class basis and is incubating as an Apache project. | |||
|
|||
The motivation for creating a Clojure package is to be able to open the deep learning library to the Clojure ecosystem and build bridges for future development and innovation for the community. It provides all the needed tools including low level and high level apis, dynamic graphs, and things like GAN and natural language support. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this section intended to be rendered on the website or just as part of the package source code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It prints out as part of the packaged api-docs that are generated by lein codox
. I didn't really know what to say so I just repeated the intro of the README. I'll remove since it doesn't really shed anything into the api docs
docs/api/clojure/module.md
Outdated
(first (ndarray/->vec (first results))) ;=>0.08261358 | ||
``` | ||
|
||
The module collects and returns all of the prediction results. For more details about the format of the return values, see the documentation for the `predict` function. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we link to the docs?
docs/api/clojure/symbol.md
Outdated
|
||
## Group Multiple Symbols | ||
|
||
To construct neural networks with multiple loss layers, we can use mxnet.sym.Group to group multiple symbols together. The following example groups two outputs: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mxnet.sym.Group
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will change to group
since that is the clojure function.
docs/api/clojure/symbol.md
Outdated
``` | ||
|
||
## Serialization | ||
There are two ways to save and load the symbols. You can use the mxnet.Symbol.save and mxnet.Symbol.load functions to serialize the Symbol objects. The advantage of using save and load functions is that it is language agnostic and cloud friendly. The symbol is saved in JSON format. You can also get a JSON string directly using mxnet.Symbol.toJson. Refer to API documentation for more details. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
two ways.... mxnet.Symbol.save
and mxnet.Symbol.load
? (but that's really one way isn't it? What's the other way to save and load?)
Also, can you link to the docs?
docs/api/clojure/symbol.md
Outdated
|
||
## Multiple Outputs | ||
|
||
;;To construct neural networks with multiple loss layers, we can use mxnet.sym.Group to group multiple symbols together. The following example groups two outputs: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the ;;?
mxnet.sym.Group
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a code comment in clojure that I forgot to take out when I was porting the code example to this markdown format. Will fix
docs/api/clojure/symbol.md
Outdated
``` | ||
|
||
After you get the ```group```, you can bind on ```group``` instead. | ||
The resulting executor will have two outputs, one for linerarregressionoutput_output and one for softmax_output. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
linerarregressionoutput_output
softmax_output
# Symbolic Configuration and Execution in Pictures | ||
|
||
This topic explains symbolic construction and execution in pictures. | ||
We recommend that you also read [Symbolic API](symbol.md). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
about the Symbolic API prior to attempting this tutorial?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't really a tutorial - it's more of a reference. I copied this verbatim from the Scala side, so any change we make here, we can do in both places if we want to reword
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about We recommend that you read the [Symbolic API](symbol.md) as another useful reference?
Thanks @aaronmarkham for reviewing and providing feedback. I'll implement the feedback. Feel free after merging to make whatever other tweaks or edits that you think will work best. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for updating things. Looks good! I'll run through it after the merge and make any minor edits.
Clojure Package Api Docs
Description
Clojure API Docs for the Website
Checklist
Essentials
Please feel free to remove inapplicable items for your PR.
Changes
Comments
The website changes are not linked in so even if the PR is merged it won't be visible yet.