This is an automated email from the ASF dual-hosted git repository.

liuxun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/submarine.git


The following commit(s) were added to refs/heads/master by this push:
     new 5f63b7e  SUBMARINE-648. Add a submarine-sdk example in Jupyter notebook
5f63b7e is described below

commit 5f63b7e075356862f859faf3ce73d3cfae4cd1cf
Author: Ryan Lo <[email protected]>
AuthorDate: Tue Oct 6 00:35:13 2020 +0800

    SUBMARINE-648. Add a submarine-sdk example in Jupyter notebook
    
    ### What is this PR for?
    To enhance the user experience of notebook, we could add a submarine sdk 
example under the working directory (default is "/home/jovyan/") in jupyter 
notebook.
    
    ### What type of PR is it?
    [Improvement]
    
    ### Todos
    * [ ] - Task
    
    ### What is the Jira issue?
    
[SUBMARINE-648](https://issues.apache.org/jira/projects/SUBMARINE/issues/SUBMARINE-648)
    
    ### How should this be tested?
    [travis 
CI](https://travis-ci.org/github/lowc1012/submarine/builds/732967403)
    
    ### Screenshots (if appropriate)
    <img width="1220" alt="img" 
src="https://user-images.githubusercontent.com/52355146/95087542-677fad00-0754-11eb-9cbe-84c45a167e22.png";>
    
    ### Questions:
    * Does the licenses files need update? No
    * Is there breaking changes for older versions? No
    * Does this needs documentation? No
    
    Author: Ryan Lo <[email protected]>
    Author: Ryan Lo <[email protected]>
    
    Closes #427 from lowc1012/SUBMARINE-648 and squashes the following commits:
    
    d71d744 [Ryan Lo] Update 
submarine-sdk/pysubmarine/example/submarine_experiment_sdk.ipynb
    b868ffd [Ryan Lo] SUBMARINE-648. remove redundant content
    73ef48f [Ryan Lo] SUBMARINE-648. Add a submarine-sdk example in Jupyter 
notebook
---
 dev-support/docker-images/jupyter/Dockerfile          |  1 +
 .../example/submarine_experiment_sdk.ipynb            | 19 ++++++++++++++++++-
 2 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/dev-support/docker-images/jupyter/Dockerfile 
b/dev-support/docker-images/jupyter/Dockerfile
index 983bcce..7e46168 100644
--- a/dev-support/docker-images/jupyter/Dockerfile
+++ b/dev-support/docker-images/jupyter/Dockerfile
@@ -95,6 +95,7 @@ RUN wget --quiet 
https://repo.continuum.io/miniconda/Miniconda3-py37_${MINICONDA
 RUN pip install notebook==6.1.3 && \
     git clone https://github.com/apache/submarine && \
     pip install submarine/submarine-sdk/pysubmarine && \
+    cp 
submarine/submarine-sdk/pysubmarine/example/submarine_experiment_sdk.ipynb 
$HOME && \
     rm submarine -rf
 
 
diff --git a/submarine-sdk/pysubmarine/example/submarine_experiment_sdk.ipynb 
b/submarine-sdk/pysubmarine/example/submarine_experiment_sdk.ipynb
index 0b1fb5a..fedc05c 100644
--- a/submarine-sdk/pysubmarine/example/submarine_experiment_sdk.ipynb
+++ b/submarine-sdk/pysubmarine/example/submarine_experiment_sdk.ipynb
@@ -33,6 +33,23 @@
   },
   {
    "cell_type": "code",
+   "execution_count": null,
+   "outputs": [],
+   "source": [
+    "# Host is \"<SUBMARINE_SERVER_DNS_NAME>:<SUBMARINE_SERVER_PORT>\" by 
default\n",
+    "# If you don't wanna use Jupyter notebook which generated by 
Submarine,\n",
+    "# please set the two environment variables 
\"SUBMARINE_SERVER_DNS_NAME\"\n",
+    "# (e.q. localhost) and \"SUBMARINE_SERVER_PORT\" (e.q. 8080)."
+   ],
+   "metadata": {
+    "collapsed": false,
+    "pycharm": {
+     "name": "#%%\n"
+    }
+   }
+  },
+  {
+   "cell_type": "code",
    "execution_count": 2,
    "metadata": {
     "pycharm": {
@@ -41,7 +58,7 @@
    },
    "outputs": [],
    "source": [
-    "submarine_client = 
submarine.ExperimentClient(host='http://submarine:8080')"
+    "submarine_client = submarine.ExperimentClient()"
    ]
   },
   {


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to