Wednesday, November 10, 2021

anbox

Anbox is a container-based approach to boot a full Android system on a regular GNU/Linux system like Ubuntu. In other words: Anbox will let you run Android on your Linux system without the slowness of virtualization.

Anbox uses Linux namespaces (user, pid, uts, net, mount, ipc) to run a full Android system in a container and provide Android applications on any GNU/Linux-based platform.

The Android inside the container has no direct access to any hardware. All hardware access is going through the anbox daemon on the host. We're reusing what Android implemented within the QEMU-based emulator for OpenGL ES accelerated rendering. The Android system inside the container uses different pipes to communicate with the host system and sends all hardware access commands through these.

https://github.com/anbox/anbox 

DisCo

Extracting actionable insight from complex unlabeled scientific data is an open challenge and key to unlocking data-driven discovery in science. Complementary and alternative to supervised machine learning approaches, unsupervised physics-based methods based on behavior-driven theories hold great promise. Due to computational limitations, practical application on real-world domain science problems has lagged far behind theoretical development. We present our first step towards bridging this divide - DisCo - a high-performance distributed workflow for the behavior-driven local causal state theory. DisCo provides a scalable unsupervised physics-based representation learning method that decomposes spatiotemporal systems into their structurally relevant components, which are captured by the latent local causal state variables. Complex spatiotemporal systems are generally highly structured and organize around a lower-dimensional skeleton of coherent structures, and in several firsts we demonstrate the efficacy of DisCo in capturing such structures from observational and simulated scientific data. To the best of our knowledge, DisCo is also the first application software developed entirely in Python to scale to over 1000 machine nodes, providing good performance along with ensuring domain scientists' productivity. We developed scalable, performant methods optimized for Intel many-core processors that will be upstreamed to open-source Python library packages. Our capstone experiment, using newly developed DisCo workflow and libraries, performs unsupervised spacetime segmentation analysis of CAM5.1 climate simulation data, processing an unprecedented 89.5 TB in 6.6 minutes end-to-end using 1024 Intel Haswell nodes on the Cori supercomputer obtaining 91% weak-scaling and 64% strong-scaling efficiency. 

https://arxiv.org/abs/1909.11822 

https://github.com/adamrupe/DisCo 

 

Tuesday, November 9, 2021

Polars

Polars is a blazingly fast DataFrames library implemented in Rust using Apache Arrow(2) as memory model.

The goal of Polars is being a lightning fast DataFrame library that utilizes all available cores on your machine.

Polars is semi-lazy. It allows you to do most of your work eagerly, similar to pandas, but it does provide you with a powerful expression syntax that will be optimized executed on polars' query engine.

Polars also supports full lazy query execution that allows for more query optimization.

Polars keeps track of your query in a logical plan. This plan is optimized and reordered before running it. When a result is requested Polars distributes the available work to different executors that use the algorithms available in the eager API to come up with the result. Because the whole query context is known to the optimizer and executors of the logical plan, processes dependent on separate data sources can be parallelized on the fly.

Below a concise list of the features allowing Polars to meet its goals:

  • Copy-on-write (COW) semantics
    • "Free" clones
    • Cheap appends
  • Appending without clones
  • Column oriented data storage
    • No block manager (-i.e.- predictable performance)
  • Missing values indicated with bitmask
    • NaN are different from missing
    • Bitmask optimizations
  • Efficient algorithms
  • Query optimizations
    • Predicate pushdown
      • Filtering at scan level
    • Projection pushdown
      • Projection at scan level
    • Simplify expressions
    • Parallel execution of physical plan
  • SIMD vectorization
  • NumPy universal functions

https://pola-rs.github.io/polars-book/user-guide/index.html 

https://github.com/pola-rs/polars 

https://www.kdnuggets.com/2021/05/pandas-faster-pypolars.html 

Hub

Hub is a dataset format with a simple API for creating, storing, and collaborating on AI datasets of any size. The hub data layout enables rapid tranformations and streaming of data while training models at scale. Hub is used by Google, Waymo, Red Cross, Oxford University, and Omdena.

Hub includes the following features:

  • Storage agnostic API: Use the same API to upload, download, and stream datasets to/from AWS S3/S3-compatible storage, GCP, Activeloop cloud, local storage, as well as in-memory.
  • Compressed storage: Store images and audios in their native compression, decompressing them only when needed, for e.g., when training a model.
  • Lazy NumPy-like slicing: Treat your S3 or GCP datasets as if they are a collection of NumPy arrays in your system's memory. Slice them, index them, or iterate through them. Only the bytes you ask for will be downloaded!
  • Dataset version control: Commits, branches, checkout - Concepts you are already familiar with in your code repositories can now be applied to your datasets as well.
  • Third-party integrations: Hub comes with built-in integrations for Pytorch and Tensorflow. Train your model with a few lines of code - we even take care of dataset shuffling. :)
  • Distributed transforms: Rapidly apply transformations on your datasets using multi-threading, multi-processing, or our built-in Ray integration.

https://github.com/activeloopai/Hub 

https://www.kdnuggets.com/2021/11/after-hdf5-data-storage-format-deep-learning.html 

PetscSF

PetscSF, the communication component of the Portable, Extensible Toolkit for Scientific Computation (PETSc), is designed to provide PETSc's communication infrastructure suitable for exascale computers that utilize GPUs and other accelerators. PetscSF provides a simple application programming interface (API) for managing common communication patterns in scientific computations by using a star-forest graph representation. PetscSF supports several implementations based on MPI and NVSHMEM, whose selection is based on the characteristics of the application or the target architecture. An efficient and portable model for network and intra-node communication is essential for implementing large-scale applications. The Message Passing Interface, which has been the de facto standard for distributed memory systems, has developed into a large complex API that does not yet provide high performance on the emerging heterogeneous CPU-GPU-based exascale systems. In this paper, we discuss the design of PetscSF, how it can overcome some difficulties of working directly with MPI on GPUs, and we demonstrate its performance, scalability, and novel features.

https://arxiv.org/abs/2102.13018 

https://www.nextplatform.com/2021/03/01/rethinking-mpi-for-gpu-accelerated-supercomputers/ 

 

Arkouda

We have developed a software package, called Arkouda, which allows a user to interactively issue massively parallel computations on distributed data using functions and syntax that mimic NumPy, the underlying computational library used in the vast majority of Python data science workflows. The computational heart of Arkouda is a Chapel interpreter that accepts a pre-defined set of commands from a client (currently implemented in Python) and uses Chapel's built-in machinery for multi-locale and multithreaded execution. Arkouda has benefited greatly from Chapel's distinctive features and has also helped guide the development of the language.

In early applications, users of Arkouda have tended to iterate rapidly between multi-node execution with Arkouda and single-node analysis in Python, relying on Arkouda to filter a large dataset down to a smaller collection suitable for analysis in Python, and then feeding the results back into Arkouda computations on the full dataset. This paradigm has already proved very fruitful for EDA. Our goal is to enable users to progress seamlessly from EDA to specialized algorithms by making Arkouda an integration point for HPC implementations of expensive kernels like FFTs, sparse linear algebra, and graph traversal. With Arkouda serving the role of a shell, a data scientist could explore, prepare, and call optimized HPC libraries on massive datasets, all within the same interactive session.

Arkouda is not trying to replace Pandas but to allow for some Pandas-style operation at a much larger scale. In our experience Pandas can handle dataframes up to about 500 million rows before performance becomes a real issue, this is provided that you run on a sufficently capable compute server. Arkouda breaks the shared memory paradigm and scales its operations to dataframes with over 200 billion rows, maybe even a trillion. In practice we have run Arkouda server operations on columns of one trillion elements running on 512 compute nodes. This yielded a >20TB dataframe in Arkouda.

 

 

https://github.com/Bears-R-Us/arkouda 

https://arkouda.readthedocs.io/en/latest/ 

https://www.youtube.com/watch?v=hzLbJF-fvjQ&t=3s 

https://www.youtube.com/watch?v=g-G_Z_3pgUE 

 

Chapel

Chapel is a modern programming language designed for productive parallel computing at scale. Chapel's design and implementation have been undertaken with portability in mind, permitting Chapel to run on multicore desktops and laptops, commodity clusters, and the cloud, in addition to the high-end supercomputers for which it was originally undertaken.

Why Chapel?  Because it simplifies parallel programming through elegant support for:

  • distributed arrays that can leverage thousands of nodes' memories and cores
  • a global namespace supporting direct access to local or remote variables
  • data parallelism to trivially use the cores of a laptop, cluster, or supercomputer
  • task parallelism to create concurrency within a node or across the system
Chapel Characteristics
  • productive: code tends to be similarly readable/writable as Python
  • scalable: runs on laptops, clusters, the cloud, and HPC systems
  • fast: performance competes with or beats C/C++ & MPI & OpenMP
  • portable: compiles and runs in virtually any *nix environment
  • open-source: hosted on GitHub, permissively licensed

 

https://github.com/chapel-lang/chapel 

https://github.com/Bears-R-Us/arkouda 

https://github.com/pnnl/chgl 

https://github.com/marcoscleison/awesome-chapel 

https://www.youtube.com/channel/UCHmm27bYjhknK5mU7ZzPGsQ 

https://news.ycombinator.com/item?id=22708041 

 

Monday, November 8, 2021

DeepSpeed

DeepSpeed is a deep learning optimization library that makes distributed training easy, efficient, and effective.

DeepSpeed delivers extreme-scale model training for everyone, from data scientists training on massive supercomputers to those training on low-end clusters or even on a single GPU:

  • Extreme scale: Using current generation of GPU clusters with hundreds of devices, 3D parallelism of DeepSpeed can efficiently train deep learning models with trillions of parameters.
  • Extremely memory efficient: With just a single GPU, ZeRO-Offload of DeepSpeed can train models with over 10B parameters, 10x bigger than the state of arts, democratizing multi-billion-parameter model training such that many deep learning scientists can explore bigger and better models.
  • Extremely long sequence length: Sparse attention of DeepSpeed powers an order-of-magnitude longer input sequence and obtains up to 6x faster execution comparing with dense transformers.
  • Extremely communication efficient: 3D parallelism improves communication efficiency allows users to train multi-billion-parameter models 2–7x faster on clusters with limited network bandwidth. 1-bit Adam/1-bit LAMB reduce communication volume by up to 5x while achieving similar convergence efficiency to Adam/LAMB, allowing for scaling to different types of GPU clusters and networks.

Below we provide a brief feature list, see our detailed feature overview for descriptions and usage.

https://github.com/microsoft/DeepSpeed 

https://www.deepspeed.ai/ 

 

cppyy

cppyy is an automatic, run-time, Python-C++ bindings generator, for calling C++ from Python and Python from C++. Run-time generation enables detailed specialization for higher performance, lazy loading for reduced memory use in large scale projects, Python-side cross-inheritance and callbacks for working with C++ frameworks, run-time template instantiation, automatic object downcasting, exception mapping, and interactive exploration of C++ libraries. cppyy delivers this without any language extensions, intermediate languages, or the need for boiler-plate hand-written code. For design and performance, see this PyHPC paper, albeit that the CPython/cppyy performance has been vastly improved since.

cppyy is based on Cling, the C++ interpreter, to match Python’s dynamism, interactivity, and run-time behavior. 

cppyy is available for both CPython (v2 and v3) and PyPy, reaching C++-like performance with the latter. It makes judicious use of precompiled headers, dynamic loading, and lazy instantiation, to support C++ programs consisting of millions of lines of code and many thousands of classes. cppyy minimizes dependencies to allow its use in distributed, heterogeneous, development environments.

https://cppyy.readthedocs.io/en/latest/index.html 

https://github.com/wlav/cppyy/ 

Glow

Glow is a machine learning compiler and execution engine for hardware accelerators. It is designed to be used as a backend for high-level machine learning frameworks. The compiler is designed to allow state of the art compiler optimizations and code generation of neural network graphs. This library is in active development. The project plan is described in the Github issues section and in the Roadmap wiki page.

Glow lowers a traditional neural network dataflow graph into a two-phase strongly-typed intermediate representation (IR). The high-level IR allows the optimizer to perform domain-specific optimizations. The lower-level instruction-based address-only IR allows the compiler to perform memory-related optimizations, such as instruction scheduling, static memory allocation and copy elimination. At the lowest level, the optimizer performs machine-specific code generation to take advantage of specialized hardware features. Glow features a lowering phase which enables the compiler to support a high number of input operators as well as a large number of hardware targets by eliminating the need to implement all operators on all targets. The lowering phase is designed to reduce the input space and allow new hardware backends to focus on a small number of linear algebra primitives. The design philosophy is described in an arXiv paper.

https://arxiv.org/abs/1805.00907 

https://github.com/pytorch/glow

Neanderthal

Neanderthal is a Clojure library for fast matrix and linear algebra computations based on the highly optimized native libraries of BLAS and LAPACK computation routines for both CPU and GPU.

https://neanderthal.uncomplicate.org/

https://neanderthal.uncomplicate.org/articles/guides.html

https://dragan.rocks/articles/20/Clojure-Numpy-Cupy-CPU-GPU 

https://dragan.rocks/articles/20/Clojure-Numpy-Cupy-CPU-GPU-2

https://github.com/uncomplicate/neanderthal 

Taichi

Taichi (太极) is a parallel programming language for high-performance numerical computations. It is embedded in Python, and its just-in-time compiler offloads compute-intensive tasks to multi-core CPUs and massively parallel GPUs.

Advanced features of Taichi include spatially sparse computing, differentiable programming [examples], and quantized computation.

https://github.com/taichi-dev/taichi 

https://docs.taichi.graphics/ 

cfgrib

Python interface to map GRIB files to the Unidata's Common Data Model v4 following the CF Conventions. The high level API is designed to support a GRIB engine for xarray and it is inspired by netCDF4-python and h5netcdf. Low level access and decoding is performed via the ECMWF ecCodes library and the eccodes python package.

Features with development status Beta:

  • enables the engine='cfgrib' option to read GRIB files with xarray,
  • reads most GRIB 1 and 2 files including heterogeneous ones with cfgrib.open_datasets,
  • supports all modern versions of Python 3.9, 3.8, 3.7 and PyPy3,
  • the 0.9.6.x series with support for Python 2 will stay active and receive critical bugfixes,
  • works wherever eccodes-python does: Linux, MacOS and Windows
  • conda-forge package on all supported platforms,
  • reads the data lazily and efficiently in terms of both memory usage and disk access,
  • allows larger-than-memory and distributed processing via xarray and dask,
  • supports translating coordinates to different data models and naming conventions,
  • supports writing the index of a GRIB file to disk, to save a full-file scan on open.

https://github.com/ecmwf/cfgrib 

 

xerus

The xerus library is a general purpose library for numerical calculations with higher order tensors, Tensor-Train Decompositions / Matrix Product States and general Tensor Networks. The focus of development was the simple usability and adaptibility to any setting that requires higher order tensors or decompositions thereof.

The key features include:

  • Modern code and concepts incorporating many features of the C++11 standard.
  • Full python bindings with very similar syntax for easy transitions from and to c++.
  • Calculation with tensors of arbitrary orders using an intuitive Einstein-like notation A(i,j) = B(i,k,l) * C(k,j,l);.
  • Full implementation of the Tensor-Train decompositions (MPS) with all neccessary capabilities (including Algorithms like ALS, ADF and CG).
  • Lazy evaluation of (multiple) tensor contractions featuring heuristics to automatically find efficient contraction orders.
  • Direct integration of the blas and lapack, as high performance linear algebra backends.
  • Fast sparse tensor calculation by usage of the suiteSparse sparse matrix capabilities.
  • Capabilites to handle arbitrary Tensor Networks.

https://libxerus.org/ 

https://git.hemio.de/xerus/xerus 

ODL

Operator Discretization Library (ODL) is a Python library that enables research in inverse problems on realistic or real data. The framework allows to encapsulate a physical model into an Operator that can be used like a mathematical object in, e.g., optimization methods. Furthermore, ODL makes it easy to experiment with reconstruction methods and optimization algorithms for variational regularization, all without sacrificing performance.

For more details and an introduction into the inner workings of ODL, please refer to the documentation. The features include:

  • A versatile and efficient library of optimization routines for smooth and non-smooth problems, such as CGLS, BFGS, PDHG and Douglas-Rachford splitting.
  • Support for tomographic imaging with a unified geometry representation and bindings to external libraries for efficient computation of projections and back-projections.
  • And much more, including support for deep learning libraries, figures of merits, phantom generation, data handling, etc.

https://github.com/odlgroup/odl 

https://odlgroup.github.io/odl/ 


NeuralPDE.jl

NeuralPDE.jl is a solver package which consists of neural network solvers for partial differential equations using scientific machine learning (SciML) techniques such as physics-informed neural networks (PINNs) and deep BSDE solvers. This package utilizes deep neural networks and neural stochastic differential equations to solve high-dimensional PDEs at a greatly reduced cost and greatly increased generality compared with classical methods.

https://github.com/SciML/NeuralPDE.jl 

https://neuralpde.sciml.ai/stable/

https://github.com/xiaoyuxie-vico/Awesome-ML-PDE 

DeepXDE

DeepXDE is a library for scientific machine learning. Use DeepXDE if you need a deep learning library that

  • solves forward and inverse partial differential equations (PDEs) via physics-informed neural network (PINN),
  • solves forward and inverse integro-differential equations (IDEs) via PINN,
  • solves forward and inverse fractional partial differential equations (fPDEs) via fractional PINN (fPINN),
  • approximates nonlinear operators via deep operator network (DeepONet),
  • approximates functions from multi-fidelity data via multi-fidelity NN (MFNN),
  • approximates functions from a dataset with/without constraints.

DeepXDE supports three tensor libraries as backends: TensorFlow 1.x (tensorflow.compat.v1 in TensorFlow 2.x), TensorFlow 2.x, and PyTorch. 

DeepXDE has implemented many algorithms as shown above and supports many features:

  • complex domain geometries without tyranny mesh generation. The primitive geometries are interval, triangle, rectangle, polygon, disk, cuboid, and sphere. Other geometries can be constructed as constructive solid geometry (CSG) using three boolean operations: union, difference, and intersection.
  • multi-physics, i.e., (time-dependent) coupled PDEs.
  • 5 types of boundary conditions (BCs): Dirichlet, Neumann, Robin, periodic, and a general BC, which can be defined on an arbitrary domain or on a point set.
  • different neural networks, such as (stacked/unstacked) fully connected neural network, residual neural network, and (spatio-temporal) multi-scale fourier feature networks.
  • 6 sampling methods: uniform, pseudorandom, Latin hypercube sampling, Halton sequence, Hammersley sequence, and Sobol sequence. The training points can keep the same during training or be resampled every certain iterations.
  • conveniently save the model during training, and load a trained model.
  • uncertainty quantification using dropout.
  • many different (weighted) losses, optimizers, learning rate schedules, metrics, etc.
  • callbacks to monitor the internal states and statistics of the model during training, such as early stopping.
  • enables the user code to be compact, resembling closely the mathematical formulation.

All the components of DeepXDE are loosely coupled, and thus DeepXDE is well-structured and highly configurable. It is easy to customize DeepXDE to meet new demands.

https://github.com/lululxvi/deepxde 

https://epubs.siam.org/doi/10.1137/19M1274067 

https://deepxde.readthedocs.io/en/latest/index.html 

https://github.com/xiaoyuxie-vico/Awesome-ML-PDE 

 

nbdev

A library that allows you to develop a python library in Jupyter Notebooks, putting all your code, tests and documentation in one place. It makes debugging and refactoring your code much easier relative to traditional programming environments. Furthermore, using nbdev promotes software engineering best practices because tests and documentation are first class citizens.

nbdev provides the following tools for developers:

  • Automatically generate docs from Jupyter notebooks. These docs are searchable and automatically hyperlinked to appropriate documentation pages by introspecting keywords you surround in backticks.
  • Utilities to automate the publishing of pypi and conda packages including version number management.
  • A robust, two-way sync between notebooks and source code, which allow you to use your IDE for code navigation or quick edits if desired.
  • Fine-grained control on hiding/showing cells: you can choose to hide entire cells, just the output, or just the input. Furthermore, you can embed cells in collapsible elements that are open or closed by default.
  • Ability to write tests directly in notebooks without having to learn special APIs. These tests get executed in parallel with a single CLI command. You can even define certain groups of tests such that you don't have to always run long-running tests.
  • Tools for merge/conflict resolution with notebooks in a human readable format.
  • Continuous integration (CI) comes setup for you with GitHub Actions out of the box, that will run tests automatically for you. Even if you are not familiar with CI or GitHub Actions, this starts working right away for you without any manual intervention.
  • Integration With GitHub Pages for docs hosting: nbdev allows you to easily host your documentation for free, using GitHub pages.
  • Create Python modules, following best practices such as automatically defining __all__ (more details) with your exported functions, classes, and variables.
  • Math equation support with LaTeX.
  • ... and much more! See the Getting Started section below for more information.

https://github.com/fastai/nbdev 

https://github.blog/2020-11-20-nbdev-a-literate-programming-environment-that-democratizes-software-engineering-best-practices/ 

 

Juttle

Juttle is an analytics system and language for developers built upon a stream-processing core and targeted for presentation-layer scale. Juttle gives you an agile way to query, analyze, and visualize live and historical data from many different big data backends or other web services. Using the Juttle dataflow language, you can specify your presentation analytics in a single place with a syntax modeled after the classic unix shell pipeline. There is no need to program against data query and visualization libraries. Juttle scripts, or juttles, tie everything together and abstract away the details.

While the Juttle syntax embraces the simplicity of the unix pipeline design pattern, it also includes a number of more powerful language concepts including functions, dataflow subgraph notation, native expressions, modules, scoping, and special aggregation functions called reducers. The details of the language and the dataflow model are desribed in the Juttle Language Reference.

In Juttle, you read data from a backend service, analyze it using dataflow processors, and send derived data or synthesized events to some output, e.g., streaming results to a browser view, writing data to a storage backend, posting http events to slack, hipchat, pagerduty, etc.

Juttle presently includes a number of adapters for various big-data backends and we are continually adding more. This means that you can interoperate with your existing infrastructure, whether it is a cassandra cluster, elastic search, a SQL database, something from the hadoop ecosystem, and so forth. If a particular backend is not yet supported, an adapter for it can be added in a relatively straightforward manner using Juttle's backend adapter API.

Under the hood, the Juttle compiler generates JavaScript output that implements the Juttle dataflow computation by executing alongside the Juttle runtime, either in node or the browser. The Juttle optimizer figures out the pattern of queries needed to run on the various big-data backends to perform the analytics specified in your Juttle programs. 

https://juttle.github.io/juttle/ 

https://github.com/juttle/juttle 

http://juttle.github.io/ 

Fugue

Fugue provides an easier interface to using distributed compute effectively and accelerates big data projects. It does this by minimizing the amount of code you need to write, in addition to taking care of tricks and optimizations that lead to more efficient execution.

Fugue is an abstraction framework that lets users write code in native Python or Pandas, and then port it over to Spark and Dask. The transform function can take in a Python or pandas function and scale it out in Spark or Dask without having to modify the function. This provides a very simple interface to parallelize Python and pandas code on distributed compute engines, such as Spark and Dask.  Fugue is a framework that is designed to unify the interface between pandas, Spark, and Dask, allowing one codebase to be used across all three engines.

https://fugue-tutorials.readthedocs.io/en/latest/index.html 

https://github.com/fugue-project/fugue

https://www.kdnuggets.com/2021/10/query-pandas-dataframes-sql.html