Skip to content

Commit d2845e4

Browse files
authored
Merge pull request #592 from jupyter-incubator/master
Release 0.14.0
2 parents 6b5001c + 38d23e7 commit d2845e4

26 files changed

+1188
-60
lines changed

CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## 0.14.0
4+
5+
### Bug fixes
6+
7+
* Enabled heartbeat by default, so long-running tasks don't time out. Thanks to John Pugliesi for the bug report.
8+
* The PySpark kernel uses Python 3 lexer, instead of Python 2. Python 2 support is going away in the near future.
9+
* Fixed papermill support; there's a different option now you need to use, `all_errors_are_fatal`. See the README for details. Thanks to Devin Stein for the patch.
10+
311
## 0.13.1
412

513
### Other changes

README.md

+7-2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ The Sparkmagic project includes a set of magics for interactively running Spark
2121
* Automatic visualization of SQL queries in the PySpark, Spark and SparkR kernels; use an easy visual interface to interactively construct visualizations, no code required
2222
* Easy access to Spark application information and logs (`%%info` magic)
2323
* Ability to capture the output of SQL queries as Pandas dataframes to interact with other Python libraries (e.g. matplotlib)
24+
* Send local files or dataframes to a remote cluster (e.g. sending pretrained local ML model straight to the Spark cluster)
2425
* Authenticate to Livy via Basic Access authentication or via Kerberos
2526

2627
## Examples
@@ -36,6 +37,10 @@ The sparkmagic library provides a %%spark magic that you can use to easily run c
3637
The sparkmagic library also provides a set of Scala and Python kernels that allow you to automatically connect to a remote Spark cluster, run code and SQL queries, manage your Livy server and Spark job configuration, and generate automatic visualizations.
3738
See [Pyspark](examples/Pyspark%20Kernel.ipynb) and [Spark](examples/Spark%20Kernel.ipynb) sample notebooks.
3839

40+
### 3. Sending data to Spark%20Kernel
41+
42+
See the [sending data to Spark notebook](examples/Send local data to Spark.ipynb).
43+
3944
## Installation
4045

4146
1. Install the library
@@ -80,8 +85,8 @@ If you want Papermill rendering to stop on a Spark error, edit the `~/.sparkmagi
8085

8186
```json
8287
{
83-
"spark_statement_errors_are_fatal": True,
84-
"shutdown_session_on_spark_statement_errors": True
88+
"shutdown_session_on_spark_statement_errors": true,
89+
"all_errors_are_fatal": true
8590
}
8691
```
8792

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '0.13.1'
1+
__version__ = '0.14.0'

examples/Magics in IPython Kernel.ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -2526,7 +2526,7 @@
25262526
"df871ce7b5fa43999cd43ed47e911d32": {
25272527
"views": [
25282528
{
2529-
"cell_index": 26
2529+
"cell_index": 26.0
25302530
}
25312531
]
25322532
},

examples/Pyspark Kernel.ipynb

+61-5
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@
136136
]
137137
},
138138
"metadata": {},
139-
"output_type": "display_data"
139+
"output_type": "execute_result"
140140
}
141141
],
142142
"source": [
@@ -167,7 +167,7 @@
167167
]
168168
},
169169
"metadata": {},
170-
"output_type": "display_data"
170+
"output_type": "execute_result"
171171
},
172172
{
173173
"data": {
@@ -179,7 +179,7 @@
179179
]
180180
},
181181
"metadata": {},
182-
"output_type": "display_data"
182+
"output_type": "execute_result"
183183
}
184184
],
185185
"source": [
@@ -224,7 +224,7 @@
224224
]
225225
},
226226
"metadata": {},
227-
"output_type": "display_data"
227+
"output_type": "execute_result"
228228
},
229229
{
230230
"data": {
@@ -236,7 +236,7 @@
236236
]
237237
},
238238
"metadata": {},
239-
"output_type": "display_data"
239+
"output_type": "execute_result"
240240
}
241241
],
242242
"source": [
@@ -482,6 +482,62 @@
482482
"print(len(query2))"
483483
]
484484
},
485+
{
486+
"cell_type": "markdown",
487+
"metadata": {},
488+
"source": [
489+
"### Send to spark (%%send_to_spark)\n",
490+
"\n",
491+
"This command gives you the ability to send local data to remote cluster. Note that passing even a simple string allows you to retain pretrained, saved ML model from local filesystem.\n",
492+
"\n",
493+
"#### Pass string to a remote cluster"
494+
]
495+
},
496+
{
497+
"cell_type": "code",
498+
"execution_count": null,
499+
"metadata": {},
500+
"outputs": [],
501+
"source": [
502+
"%%local\n",
503+
"variable = 'this string will be available in spark cluster'"
504+
]
505+
},
506+
{
507+
"cell_type": "code",
508+
"execution_count": null,
509+
"metadata": {},
510+
"outputs": [],
511+
"source": [
512+
"%%send_to_spark -i variable -n custom_name -t str"
513+
]
514+
},
515+
{
516+
"cell_type": "code",
517+
"execution_count": null,
518+
"metadata": {},
519+
"outputs": [],
520+
"source": [
521+
"print custom_name"
522+
]
523+
},
524+
{
525+
"cell_type": "markdown",
526+
"metadata": {},
527+
"source": [
528+
"#### Send pretrained scikit-learn model to a remote cluster"
529+
]
530+
},
531+
{
532+
"cell_type": "code",
533+
"execution_count": null,
534+
"metadata": {},
535+
"outputs": [],
536+
"source": [
537+
"%%local\n",
538+
"## todo"
539+
]
540+
},
485541
{
486542
"cell_type": "markdown",
487543
"metadata": {},

0 commit comments

Comments
 (0)