jupyter notebooks for transmogrify samples#231
Conversation
Codecov Report
@@ Coverage Diff @@
## master #231 +/- ##
=========================================
- Coverage 86.42% 82.4% -4.02%
=========================================
Files 312 312
Lines 10187 10187
Branches 336 548 +212
=========================================
- Hits 8804 8395 -409
- Misses 1383 1792 +409
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #231 +/- ##
==========================================
- Coverage 86.39% 82.39% -4.01%
==========================================
Files 312 312
Lines 10183 10183
Branches 335 548 +213
==========================================
- Hits 8798 8390 -408
- Misses 1385 1793 +408
Continue to review full report at Codecov.
|
|
@rajdeepd please move the notebook files into |
53e0571 to
05215ef
Compare
|
@tovbinm done |
|
|
@tovbinm made the changes |
| @@ -0,0 +1,128 @@ | |||
| { | |||
There was a problem hiding this comment.
why do we need ListOfFiles.ipynb?
There was a problem hiding this comment.
test notebook to make sure training data is mounted in the container path, will remove it
|
@tovbinm please review |
leahmcguire
left a comment
There was a problem hiding this comment.
This is awesome!! Thanks for contributing!
helloworld/notebooks/README.md
Outdated
|
|
||
| ```bash | ||
| docker run -p 8888:8888 -v /Users/rdua/work/github/rajdeepd/TransmogrifAI/helloworld/notebooks:/home/beakerx/helloworld-notebooks \ | ||
| -v /Users/rdua/work/github/rajdeepd/TransmogrifAI/helloworld:/home/beakerx/helloworld beakerx/beakerx |
There was a problem hiding this comment.
maybe just change example to $TransmografaiPATH
| "cell_type": "markdown", | ||
| "metadata": {}, | ||
| "source": [ | ||
| "After model has been fitted we use `scoreAndEvaluate()` function to evaluate the metrics" |
There was a problem hiding this comment.
it would be nice to mention that you can change out the data before doing this by either setting a new path or a new reader
| "cell_type": "markdown", | ||
| "metadata": {}, | ||
| "source": [ | ||
| "After model has been fitted we use scoreAndEvaluate() function to evaluate the metrics" |
There was a problem hiding this comment.
it would be nice to mention that you can change out the data before doing this by either setting a new path or a new reader
helloworld/notebooks/README.md
Outdated
| @@ -0,0 +1,100 @@ | |||
| # Transmogrify on Jupyter | |||
helloworld/notebooks/README.md
Outdated
| @@ -0,0 +1,100 @@ | |||
| # Transmogrify on Jupyter | |||
|
|
|||
| In this section we will look at how Transmogrify can be run within Scala notebooks on | |||
helloworld/notebooks/README.md
Outdated
| In this section we will look at how Transmogrify can be run within Scala notebooks on | ||
| Jupyter. | ||
|
|
||
| We are going to leverage [BeakerX](http://beakerx.com/) scala kernel for Jupyter |
helloworld/notebooks/README.md
Outdated
|
|
||
| * Apache Maven | ||
| * Python 3 | ||
| * JDK 8 (JDK 10 or above can cause issues with Transmogrify) |
There was a problem hiding this comment.
simply JDK 8 only - don't mention anything else
| Installation using pip | ||
|
|
||
| ```$xslt | ||
| sudo pip install beakerx |
There was a problem hiding this comment.
does this have to be sudo? (just curios)
There was a problem hiding this comment.
sometimes pip install fails because of permissions issue
helloworld/notebooks/README.md
Outdated
| BeakerX provides a [docker container image](https://hub.docker.com/r/beakerx/beakerx/) on docker hub. | ||
|
|
||
| Assuming your Transmogrify source code is downloaded at `/Users/rdua/work/github/rajdeepd/TransmogrifAI`. You can use | ||
| the following command to start the container. We need the directory above so that we can mount sample notebooks and dataset |
There was a problem hiding this comment.
Which command are you referring to?
There was a problem hiding this comment.
docker run command - updated the doc
helloworld/notebooks/README.md
Outdated
|
|
||
| ### Set TransmogrifaiPATH | ||
|
|
||
| export TransmogrifaiPATH=<transmogrify installation dir> |
There was a problem hiding this comment.
export TransmogrifaiPATH=<TransmogrifAI installation dir>
| ### Run the beakerx Container | ||
|
|
||
| ```bash | ||
| docker run -p 8888:8888 -v $TransmogrifaiPATH/helloworld/notebooks:/home/beakerx/helloworld-notebooks \ |
There was a problem hiding this comment.
why do we need to mount both paths?
There was a problem hiding this comment.
one is for jupyter notebooks, another for data -- data is helloworld so the jupyter notebook mount point cannot access it
helloworld/notebooks/README.md
Outdated
|
|
||
| On opening the image in the browser you will notice that in the home page | ||
|
|
||
| ![notebook_home][notebooks_home] |
There was a problem hiding this comment.
missing image notebook_home?
helloworld/notebooks/README.md
Outdated
|
|
||
| #### OpTitanicSimple | ||
|
|
||
| [OpTitanicSimple.ipynb](http://localhost:8888/notebooks/helloworld-jupyter/OpTitanicSimple.ipynb) |
There was a problem hiding this comment.
are you sure that the links for the notebooks are correct?
There was a problem hiding this comment.
thanks for pointing out..
| "outputs": [], | ||
| "source": [ | ||
| "val fittedWorkflow = workflow.train()\n", | ||
| "println(s\"Summary: ${fittedWorkflow.summary()}\")" |
There was a problem hiding this comment.
println(s\"Summary: ${fittedWorkflow.summaryPretty()
helloworld/notebooks/OpIris.ipynb
Outdated
| "outputs": [], | ||
| "source": [ | ||
| "val fittedWorkflow = workflow.train()\n", | ||
| "println(s\"Summary: ${fittedWorkflow.summary()}\")" |
There was a problem hiding this comment.
same here - println(s\"Summary: ${fittedWorkflow.summaryPretty()
|
@tovbinm @leahmcguire please merge |
|
Thank you @rajdeepd |
|
Thanks for the contribution! Unfortunately we can't verify the commit author(s): Leah McGuire <l***@s***.com>. One possible solution is to add that email to your GitHub account. Alternatively you can change your commits to another email and force push the change. After getting your commits associated with your GitHub account, refresh the status of this Pull Request. |
Related issues
Refer to issue(s) addressed in this pull request from [Issues]
#211
Describe the proposed solution
Jupyter notebook samples based on BeakerX based kernel
Describe alternatives you've considered
Apache Toree, almond-sh based kernels, most of these solutions were not as straight forward as beakerx
Additional context
none