-
Notifications
You must be signed in to change notification settings - Fork 395
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need ListOfFiles.ipynb
?
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.
test notebook to make sure training data is mounted in the container path, will remove it
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.
removed
@tovbinm please review |
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 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe just change example to $TransmografaiPATH
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.
done
"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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
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.
changed
"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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
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.
changed
helloworld/notebooks/README.md
Outdated
@@ -0,0 +1,100 @@ | |||
# Transmogrify on Jupyter |
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.
TransmogrifAI on Jupyter
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.
done
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 |
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.
TransmogrifAI
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.
done
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 |
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.
Scala kernel
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.
done
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
simply JDK 8 only
- don't mention anything else
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.
done
Installation using pip | ||
|
||
```$xslt | ||
sudo pip install beakerx |
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 have to be sudo? (just curios)
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which command are you referring to?
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
escape with `
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.
export TransmogrifaiPATH=<TransmogrifAI installation dir>
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.
fixed
### 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need to mount both paths?
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing image notebook_home
?
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.
fixed
helloworld/notebooks/README.md
Outdated
|
||
#### OpTitanicSimple | ||
|
||
[OpTitanicSimple.ipynb](http://localhost:8888/notebooks/helloworld-jupyter/OpTitanicSimple.ipynb) |
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.
are you sure that the links for the notebooks are correct?
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 pointing out..
"outputs": [], | ||
"source": [ | ||
"val fittedWorkflow = workflow.train()\n", | ||
"println(s\"Summary: ${fittedWorkflow.summary()}\")" |
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.
println(s\"Summary: ${fittedWorkflow.summaryPretty()
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.
fixed
helloworld/notebooks/OpIris.ipynb
Outdated
"outputs": [], | ||
"source": [ | ||
"val fittedWorkflow = workflow.train()\n", | ||
"println(s\"Summary: ${fittedWorkflow.summary()}\")" |
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.
same here - println(s\"Summary: ${fittedWorkflow.summaryPretty()
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.
fixed
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.
LGTM!
@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