[SYSTEMDS-2576] Rework function dictionary (correctness eval/paramserv)

This patch fixes a severe correctness issue of second-order functions
like eval or paramserv. Specifically, if a script contains a function
call (or multiple calls with consistent sizes/scalars) to a function as
well as indirect calls with different parameters, our existing IPA too
aggressively optimized functions by pushing sizes/scalars into this
function. If the same optimized function is then called from eval with
completely different parameters, the optimized plan might be invalid,
and thus yield incorrect results.

In order to get the best of both worlds (optimized functions and the
flexibility of second order function calls), we now maintain optimized
functions as usual, but if the script contains a second order function,
we also keep the unoptimized functions (before inter-procedural
analysis) and call these functions as needed. For example, a call from
eval, needs to call the unoptimized functions and unoptimized versions
of transitively called functions.

This further introduces a new function dictionary (that internally
maintains both versions of functions), which is used in both function
statement blocks and function program blocks. Additionally, this
includes several cleanups for the handling of namespaces (removed
incomprehensible structure of dml programs) and renamed the function
call opcode as we no longer support external functions. As another
byproduct, we now have the mechanisms for create deep copies of entire
hierarchies of statements (so far we only had that for program blocks).
37 files changed
tree: 750fb37f61ee638dda55f98fa373e7d4d1ab9d6d
  1. .github/
  2. bin/
  3. conf/
  4. dev/
  5. docker/
  6. docs/
  7. scripts/
  8. src/
  9. .gitattributes
  10. .gitignore
  11. CONTRIBUTING.md
  12. LICENSE
  13. NOTICE
  14. pom.xml
  15. README.md
README.md

Apache SystemDS

Overview: SystemDS is a versatile system for the end-to-end data science lifecycle from data integration, cleaning, and feature engineering, over efficient, local and distributed ML model training, to deployment and serving. To this end, we aim to provide a stack of declarative languages with R-like syntax for (1) the different tasks of the data-science lifecycle, and (2) users with different expertise. These high-level scripts are compiled into hybrid execution plans of local, in-memory CPU and GPU operations, as well as distributed operations on Apache Spark. In contrast to existing systems - that either provide homogeneous tensors or 2D Datasets - and in order to serve the entire data science lifecycle, the underlying data model are DataTensors, i.e., tensors (multi-dimensional arrays) whose first dimension may have a heterogeneous and nested schema.

Quick Start Install, Quick Start and Hello World

Documentation: SystemDS Documentation

Python Documentation Python SystemDS Documentation

Status and Build: SystemDS is still in pre-alpha status. The original code base was forked from Apache SystemML 1.2 in September 2018. We will continue to support linear algebra programs over matrices, while replacing the underlying data model and compiler, as well as substantially extending the supported functionalities. Until the first release, you can build your own snapshot via Apache Maven: mvn clean package -P distribution.

Build Documentation Component Test Application Test Function Test Python Test Federated Python Test