Giter Club home page Giter Club logo

spartan's Introduction

Spartan

Build Status

Spartan is a library for distributed array programming. Programmers build up array expressions (using Numpy-like operations). These expressions are then compiled and optimized and run on a distributed array backend across multiple machines.

Check out the tutorial on the wiki.

Installation

From PyPI (not necessarily up-to-date)

pip install [--user] spartan

From source

# For numpy and scipy, we suggest you use binary install to
# get better performance.
apt-get install python-numpy python-scipy libzmq3-dev
pip install --user dsltools
pip install --user pyzmq
pip install --user cython
pip install --user parakeet
pip install --user scikit-learn
pip install --user traits
git clone https://github.com/spartan-array/spartan.git
cd spartan
python setup.py develop --user

Usage

Operations in Spartan look superficially like numpy array operations, but actually are composed into a deferred expression tree. For example:

>> In [3]: x = spartan.ones((10, 10))
>> In [4]: x

MapExpr {
  local_dag = None,
  fn_kw = DictExpr {
    vals = {}
  },
  children = ListExpr {
    vals = [
    [0] = NdArrayExpr {
      combine_fn = None,
      dtype = <type 'float'>,
      _shape = (10, 10),
      tile_hint = None,
      reduce_fn = None
    }
    ]
  },
  map_fn = <function <lambda> at 0x3dbae60>
}

Expressions are combined together lazily until they are forced -- this is caused by a call to the force method.

Running

Tests can be run using nosetests pip install --user nose.

pip install --user nose
nosetests tests/

There are a few benchmarks for performance testing, see

tests/benchmark_*.py

spartan's People

Contributors

easonliao avatar fegin avatar gabrielwen avatar maggieqi avatar rgardner avatar rgbkrk avatar rjpower avatar

Watchers

 avatar

spartan's Issues

Does a sparse array need a mask?

For current implementation, we don't give a mask array to a sparse array.
However, if it is necessary for a sparse array to have a mask array for some reduction operation such as min.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.