Experimental catalyst conversions for low-dimension tensors

Open
#35 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
20/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
scala, spark

Research direction

Start by investigating how Catalyst logical plans and Spark's Tungsten representation handle scalar, vector, and higher-order tensor columns. Compare the current covariance-matrix computation with the proposed buffer-copy and flattening approaches, and determine how the four basic types could share generated code. Done means an experimental conversion path, a higher-order-tensor fallback, and a benchmark result.

Written by the indexing model from the issue text.

Description

enhancement

Directly integrate with the logical plan of Catalyst when working on small dimensions.

For columns containing scalars or vectors, perform an unsafe memory copy to a buffer instead of using scala collections, and provide a fallback for higher-order tensors. It is recommended to flatten the operations for higher order tensors because the Tungsten representation is not very efficient from a memory perspective.

Implementation for the 4 basic types will duplicate some code, so investigate a templating library or scala macros to generate the code for each type?

The benchmark for this task will be the computation of the covariance matrix of a dataset (hopefully, it can get faster than the current computation in Spark).

Dominant language
Scala
Stars
743
Forks
158
PR merge metrics
No merged PRs in 30d

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from databricks/tensorframes

All issues in databricks/tensorframes

Similar issues

More Scala issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.