ipython: a modern vision of interactive computing (pydata sv 2013)
Post on 26-Jan-2015
116 Views
Preview:
DESCRIPTION
TRANSCRIPT
IPython Open Source Academia Wrapup
IPythonA modern vision of interactive computing
Fernando Pérezhttp://fperez.org, @fperez_org
Fernando.Perez@berkeley.edu
Henry H. Wheeler Jr. Brain Imaging Center, UC Berkeley
PyData 2013, Silicon ValleyMarch 20, 2013
IPython Open Source Academia Wrapup
Outline
1 IPython: Interactive Python
2 The Life of an Open Source Project
3 Academia vs Open Source
4 Wrapup
FP (UC Berkeley) IPython 3/20/13 2 / 34
In the beginning, IBM said...
Let there be FORTRAN
In the beginning, IBM said...
Let there be FORTRAN
Beyond (Floating Point) Number Crunching
Hardwarefloating point
Arbitrary precisionintegers
Rationals
Interval arithmetic
Symbolic manipulation
FORTRAN
Extended precisionfloating point
Text processing
Databases
Graphical userinterfaces
Web interfacesHardwarecontrol
Multi-languageintegration
Data formats: HDF5, XML, ...
The purpose of computing is insight, not numbers.
Richard Hamming, 1962
IPython Open Source Academia Wrapup
The computer as microscope
Exploratory: Problem’s definition evolves as we understand it.No ‘requirements’ to build an application against.Mathematica, Maple, Matlab, IDL, etc.
All have an interactive environment.
Applications Languages
FP (UC Berkeley) IPython 3/20/13 6 / 34
IPython: part of a Rich Ecosystem
IPython
NetworkX
IPython Open Source Academia Wrapup
The Lifecycle of a Scientific Idea (schematically)
1 Individual exploratory work2 Collaborative development3 Parallel production runs (HPC, cloud, ...)4 Publication (with reproducible results!)5 Education6 Goto 1.
The Problem with most toolsBarriers and discontinuities in workflow in between all the steps
FP (UC Berkeley) IPython 3/20/13 8 / 34
IPython Open Source Academia Wrapup
The Lifecycle of a Scientific Idea (schematically)
1 Individual exploratory work2 Collaborative development3 Parallel production runs (HPC, cloud, ...)4 Publication (with reproducible results!)5 Education6 Goto 1.
The Problem with most toolsBarriers and discontinuities in workflow in between all the steps
FP (UC Berkeley) IPython 3/20/13 8 / 34
IPython’s goal:Fluid transitions in all these steps
Demo
IPython Open Source Academia Wrapup
Pillar #1: An architecture for interactive computing
FP (UC Berkeley) IPython 3/20/13 11 / 34
IPython Open Source Academia Wrapup
Pillar #2: the Notebook Format
JSON but version control-friendlyEasy for machine processing, fixable by hand if need be.Lots of hooks for metadataNot Python-specific (Ruby, JS notebooks exist, R, Julia planned)Produce Markdown, reST, LATEX, HTML, etc...
An open format for sharing, publishing andarchiving executable computational work
FP (UC Berkeley) IPython 3/20/13 12 / 34
IPython Open Source Academia Wrapup
Outline
1 IPython: Interactive Python
2 The Life of an Open Source Project
3 Academia vs Open Source
4 Wrapup
FP (UC Berkeley) IPython 3/20/13 13 / 34
Documented protocols and formats:a growing ecosystem around IPython
An Emacs Notebook Client!Takafumi Arakaki
http://tkf.github.com/emacs-ipython-notebook
Microsoft Visual Studio 2010 integrated consoleDino Viehland and Shahrokh Mortazavi (Microsoft)
http://pytools.codeplex.com
A vim client to control an IPython kernel/consolePaul Ivanov (Berkeley)
https://github.com/ivanov/vim-ipython
Notebooks on Windows Azure CloudShahrokh Mortazavi (Microsoft), B.G., F.P.
http://bit.ly/JQeojD
Star Cluster: IPython parallel+Notebook on Amazon EC2Justin Riley (MIT)
http://web.mit.edu/star/cluster
NBViewer: easy notebook sharingMatthias Bussonnier
http://nbviewer.ipython.org
Other projects using IPython
ScientificEPD: Enthought Python Distribution.Anaconda: Continuum Python Distribution.Sage: open source mathematics.PyRAF: Space Telescope Science InstituteCASA: Nat. Radio Astronomy ObservatoryGanga: CERNPyMAD: neutron spectrom., Laue LangevinSardana: European Synchrotron RadiationASCEND: eng. modeling (Carnegie Mellon).JModelica: dynamical systems.DASH: Denver Aerosol Sources and Health.Trilinos: Sandia National Lab.DoD: baseline configuration.NiPype: computational pipelines, MIT.PyIMSL Studio, by Visual Numerics.
...
Web/OtherVisual Studio 2010: MS.Django.Turbo Gears.Pylons web frameworkZope and Plone CMS.Axon Shell, BBCKamaelia.Schevo database.Pitz: distributedtask/bug tracking.iVR (interactive VirtualReality).Movable Python(portable Pythonenvironment)....
How did we get here?A brief history of IPython
October 2001: “just a little afternoon hack”My own $PYTHONSTARTUP:
ipython-0.0.1.py: 259 lines.In [N]: prompts and _N results cache.
IPP (Interactive Python Prompt) by Janko Hauser (Oceanography)LazyPython by Nathan Gray (CS Caltech)
2002: Ignore John Hunter’s Gnuplot support patches... let there be matplotlib(actually finish my PhD!)
2005: Brian Granger, Min Ragan-KelleyFirst parallel tools, Twisted-based
2005-2008: Ville Vainio, Gaël Varoquaux, Laurent DufréchouCore maintenance, Wx integration.
Summer 2009: NIH-funded cleanup by Brian.March 2010: prototype networked shell using ØMQ
2-day sprint with Brian
Enthought funds Qt console. Min ports parallel code to ØMQCore architecture ready, foundation for Notebook
Fall 2010James Gao at Berkeley builds (5th!) Notebook Prototype.
Summer 2011Brian rebuids James’ prototype into today’s Notebook.
(Incomplete) Cast of CharactersBrian Granger - Physics, Cal State San Luis ObispoMin Ragan-Kelley - Nuclear Engineering, UC BerkeleyMatthias Bussonnier - Physics, Institut Curie, ParisBrad Froehle - Mathematics, UC BerkeleyPaul Ivanov - Neuroscience, UC Berkeley.Robert Kern - EnthoughtThomas Kluyver - Biology, U. SheffieldJonathan March- EnthoughtEvan Patterson - Physics, Caltech/EnthoughtJörgen Stenarson - Elect. Engineering, Sweden.Stefan van der Walt - UC BerkeleyJohn Hunter - TradeLink Securities, Chicago.Prabhu Ramachandran - Aerospace Engineering, IIT Bombay.Satra Ghosh- MIT NeuroscienceGaël Varoquaux - Neurospin (Orsay, France)Ville Vainio - CS, Tampere University of Technology, FinlandBarry Wark - Neuroscience, U. Washington.Ondrej Certik - Physics, U Nevada RenoDarren Dale - CornellJustin Riley - MITMark Voorhies - UC San FranciscoNicholas Rougier - INRIA Nancy Grand EstThomas Spura - Fedora projectMany more! (~220 commit authors)
IPython Open Source Academia Wrapup
Outline
1 IPython: Interactive Python
2 The Life of an Open Source Project
3 Academia vs Open Source
4 Wrapup
FP (UC Berkeley) IPython 3/20/13 26 / 34
Support at the edges of academic funding
Enthought, Austin, TX: Lots!Microsoft: WinHPC support, Visual Studio integration, Azure(thanks to Shahrokh Mortazavi).DoD/DRC Inc: funding through Sept. 2012 (thanks to JoseUnpingco and Chris Keees).NIH: via NiPy grantNSF: via Sage compmath grantGoogle: summer of code 2005, 2010.Tech-X Corp., Boulder, CO: Parallel/notebook (previous versions)Recent stable funding (2 years, 7 people, J. Taylor):
Open Source:skills, tools and practices we need!
A culture where things get done.Wildly collaborativeReproducible by necessityVersion control, testing, documentation, public peer review, etc.
Reward Structure in academia:we punish all of the above
Departmental boundaries: interdisciplinary work is a great buzzword,not such a great career path.
Computational heritage is built on codenot on citations
Continuous evolution vs publication milestonesAuthorship in collaborative works vs the first-author paper.Scholarship and intellectual effort embedded in the code.
NumFOCUS: Open Code, Better Science
Promote the health of our open source scientific computingecosystem
Support the development of multiple projects.Community-created and driven.A neutral ground for industry, academia and government to supportscientific open source.501(c)3 - donations are tax-exempt in the USA
http://numfocus.org
IPython Open Source Academia Wrapup
Outline
1 IPython: Interactive Python
2 The Life of an Open Source Project
3 Academia vs Open Source
4 Wrapup
FP (UC Berkeley) IPython 3/20/13 31 / 34
The future of IPython: a 2-year roadmap
Spring/summer 2013: IPython 1.0Notebook document management (nbconvert)JavaScript internals cleanup
Fall 2013Interactive JavaScript APIWith callbacks to remote kernels.
2014Multiuser serverSimple to deployTrusted (shell OK) Unix users in a lab, group, class, etc.
https://github.com/ipython/ipython/wiki/Roadmap:-IPython
In closing: our vision of scientific computing
Build on the right abstractionsThe kernel: unify interactive and parallel computing
→ you only have one brain!
A single protocol: many kernels, many clients.Communications and logging
the protocol is the notebook file format.
Insight and communication (Hamming)“Literate computing” vs “literate programming”.
Build a community and an ecosystem“How to Scale a Code in the Human Dimension”, M. Turk,http://arxiv.org/abs/1301.7064.
In closing: our vision of scientific computing
Build on the right abstractionsThe kernel: unify interactive and parallel computing
→ you only have one brain!
A single protocol: many kernels, many clients.Communications and logging
the protocol is the notebook file format.
Insight and communication (Hamming)“Literate computing” vs “literate programming”.
Build a community and an ecosystem“How to Scale a Code in the Human Dimension”, M. Turk,http://arxiv.org/abs/1301.7064.
In closing: our vision of scientific computing
Build on the right abstractionsThe kernel: unify interactive and parallel computing
→ you only have one brain!
A single protocol: many kernels, many clients.Communications and logging
the protocol is the notebook file format.
Insight and communication (Hamming)“Literate computing” vs “literate programming”.
Build a community and an ecosystem“How to Scale a Code in the Human Dimension”, M. Turk,http://arxiv.org/abs/1301.7064.
John D. Hunter, 1968-2012: http://matplotlib.orgMemorial fund: http://numfocus.org/johnhunter
top related