##// END OF EJS Templates
Test for #2727 (%run -m doesn't support relative imports)...
Test for #2727 (%run -m doesn't support relative imports) test_run_submodule_with_relative_import fails.

File last commit:

r9190:20a102a5
r9994:ced51b9d
Show More
taskmap.ipynb
124 lines | 2.9 KiB | text/plain | TextLexer
Brian E. Granger
Converting notebooks to JSON format.
r4634 {
MinRK
regenerate example notebooks to remove transformed output
r5981 "metadata": {
"name": "taskmap"
Brian Granger
Updating example notebooks to v3 format.
r6035 },
"nbformat": 3,
MinRK
rebuild example notebooks...
r7739 "nbformat_minor": 0,
MinRK
regenerate example notebooks to remove transformed output
r5981 "worksheets": [
{
"cells": [
{
Brian Granger
Updating example notebooks to v3 format.
r6035 "cell_type": "markdown",
MinRK
rebuild example notebooks...
r7739 "metadata": {},
MinRK
regenerate example notebooks to remove transformed output
r5981 "source": [
"# Load balanced map and parallel function decorator"
]
Brian Granger
Updating example notebooks to v3 format.
r6035 },
MinRK
regenerate example notebooks to remove transformed output
r5981 {
Brian Granger
Updating example notebooks to v3 format.
r6035 "cell_type": "code",
"collapsed": true,
MinRK
regenerate example notebooks to remove transformed output
r5981 "input": [
"from IPython.parallel import Client"
Brian Granger
Updating example notebooks to v3 format.
r6035 ],
"language": "python",
MinRK
rebuild example notebooks...
r7739 "metadata": {},
Brian Granger
Updating example notebooks to v3 format.
r6035 "outputs": [],
MinRK
regenerate example notebooks to remove transformed output
r5981 "prompt_number": 1
Brian Granger
Updating example notebooks to v3 format.
r6035 },
MinRK
regenerate example notebooks to remove transformed output
r5981 {
Brian Granger
Updating example notebooks to v3 format.
r6035 "cell_type": "code",
"collapsed": false,
MinRK
regenerate example notebooks to remove transformed output
r5981 "input": [
MinRK
rebuild example notebooks...
r7739 "rc = Client()\n",
MinRK
regenerate example notebooks to remove transformed output
r5981 "v = rc.load_balanced_view()"
Brian Granger
Updating example notebooks to v3 format.
r6035 ],
"language": "python",
MinRK
rebuild example notebooks...
r7739 "metadata": {},
Brian Granger
Updating example notebooks to v3 format.
r6035 "outputs": [],
MinRK
rebuild example notebooks...
r7739 "prompt_number": 2
Brian Granger
Updating example notebooks to v3 format.
r6035 },
MinRK
regenerate example notebooks to remove transformed output
r5981 {
Brian Granger
Updating example notebooks to v3 format.
r6035 "cell_type": "code",
"collapsed": false,
MinRK
regenerate example notebooks to remove transformed output
r5981 "input": [
MinRK
rebuild example notebooks...
r7739 "result = v.map(lambda x: 2*x, range(10))\n",
MinRK
regenerate example notebooks to remove transformed output
r5981 "print \"Simple, default map: \", list(result)"
Brian Granger
Updating example notebooks to v3 format.
r6035 ],
"language": "python",
MinRK
rebuild example notebooks...
r7739 "metadata": {},
MinRK
regenerate example notebooks to remove transformed output
r5981 "outputs": [
{
Brian Granger
Updating example notebooks to v3 format.
r6035 "output_type": "stream",
"stream": "stdout",
MinRK
regenerate example notebooks to remove transformed output
r5981 "text": [
"Simple, default map: "
]
Brian Granger
Updating example notebooks to v3 format.
r6035 },
MinRK
regenerate example notebooks to remove transformed output
r5981 {
Brian Granger
Updating example notebooks to v3 format.
r6035 "output_type": "stream",
"stream": "stdout",
MinRK
regenerate example notebooks to remove transformed output
r5981 "text": [
MinRK
rebuild example notebooks...
r7739 "[0, 2, 4, 6, 8, 10, 12, 14, 16, 18]\n"
MinRK
regenerate example notebooks to remove transformed output
r5981 ]
}
Brian Granger
Updating example notebooks to v3 format.
r6035 ],
MinRK
rebuild example notebooks...
r7739 "prompt_number": 3
Brian Granger
Updating example notebooks to v3 format.
r6035 },
MinRK
regenerate example notebooks to remove transformed output
r5981 {
Brian Granger
Updating example notebooks to v3 format.
r6035 "cell_type": "code",
"collapsed": false,
MinRK
regenerate example notebooks to remove transformed output
r5981 "input": [
MinRK
rebuild example notebooks...
r7739 "ar = v.map_async(lambda x: 2*x, range(10))\n",
"print \"Submitted tasks, got ids: \", ar.msg_ids\n",
"result = ar.get()\n",
MinRK
regenerate example notebooks to remove transformed output
r5981 "print \"Using a mapper: \", result"
Brian Granger
Updating example notebooks to v3 format.
r6035 ],
"language": "python",
MinRK
rebuild example notebooks...
r7739 "metadata": {},
MinRK
regenerate example notebooks to remove transformed output
r5981 "outputs": [
{
Brian Granger
Updating example notebooks to v3 format.
r6035 "output_type": "stream",
"stream": "stdout",
MinRK
regenerate example notebooks to remove transformed output
r5981 "text": [
MinRK
rebuild example notebooks...
r7739 "Submitted tasks, got ids: ['d482fcb3-f8e9-41ff-ba16-9fd4118324f1', 'e4fe38dd-8a4d-4f3a-a111-e4c9fdbea7c3', '580431f4-ac66-4517-b03e-a58aa690a87b', '19a012cf-5d9d-4cf3-9656-d56263958c0e', '012ebbb5-5def-47ad-a247-20f88d2c8980', '0dea6cdb-5b22-4bac-a1bb-7544c0ef44e6', '909d073f-7eee-42a7-8f3b-8f7aa32e7639', 'be6c7466-d541-47a0-b12d-bc408d40ad77', 'b97b5967-a5a3-45c5-95cc-44e0823fd646', '69b06902-9526-42d9-bda6-c943be19cc5a']\n",
"Using a mapper: [0, 2, 4, 6, 8, 10, 12, 14, 16, 18]\n"
MinRK
regenerate example notebooks to remove transformed output
r5981 ]
}
Brian Granger
Updating example notebooks to v3 format.
r6035 ],
MinRK
rebuild example notebooks...
r7739 "prompt_number": 4
Brian Granger
Updating example notebooks to v3 format.
r6035 },
MinRK
regenerate example notebooks to remove transformed output
r5981 {
Brian Granger
Updating example notebooks to v3 format.
r6035 "cell_type": "code",
"collapsed": false,
MinRK
regenerate example notebooks to remove transformed output
r5981 "input": [
MinRK
rebuild example notebooks...
r7739 "@v.parallel(block=True)\n",
"def f(x): return 2*x\n",
"\n",
"result = f.map(range(10))\n",
MinRK
regenerate example notebooks to remove transformed output
r5981 "print \"Using a parallel function: \", result"
Brian Granger
Updating example notebooks to v3 format.
r6035 ],
"language": "python",
MinRK
rebuild example notebooks...
r7739 "metadata": {},
MinRK
regenerate example notebooks to remove transformed output
r5981 "outputs": [
{
Brian Granger
Updating example notebooks to v3 format.
r6035 "output_type": "stream",
"stream": "stdout",
MinRK
regenerate example notebooks to remove transformed output
r5981 "text": [
MinRK
rebuild example notebooks...
r7739 "Using a parallel function: [0, 2, 4, 6, 8, 10, 12, 14, 16, 18]\n"
MinRK
regenerate example notebooks to remove transformed output
r5981 ]
}
Brian Granger
Updating example notebooks to v3 format.
r6035 ],
MinRK
rebuild example notebooks...
r7739 "prompt_number": 5
},
{
"cell_type": "code",
"collapsed": false,
"input": [],
"language": "python",
"metadata": {},
"outputs": []
MinRK
regenerate example notebooks to remove transformed output
r5981 }
MinRK
rebuild example notebooks...
r7739 ],
"metadata": {}
MinRK
regenerate example notebooks to remove transformed output
r5981 }
]
Brian E. Granger
Converting notebooks to JSON format.
r4634 }