Skip to content

ML cost model integration for Wayang#765

Open
mspruc wants to merge 14 commits into
apache:mainfrom
mspruc:ml-optimizer
Open

ML cost model integration for Wayang#765
mspruc wants to merge 14 commits into
apache:mainfrom
mspruc:ml-optimizer

Conversation

@mspruc
Copy link
Copy Markdown
Contributor

@mspruc mspruc commented Jun 2, 2026

Wayang currently is based on manually tuned cost models, this can be time consuming to manually tune therefore we implement

  • DefaultPointwiseCost which is called using Wayangs native EstimatableCostFactory, you just need to provide it to Wayangs Configuration
  • cost_model.onnx a pretrained sample model, based off a tree convolutional neural network for cost prediction, we also allow you to manually set a model with config.setProperty("wayang.ml.model.file", modelPath);
  • Introduces TreeNode, TreeEncoder, TreeDecoder, OneHotEncoder, OneHotMappings encoding schemes which allows capturing deep relationships within a plan
  • Integrates cost_model.onnx calls via OnnxRuntime

and various other features. We include WordCountIntegrationTest as an example of how to call it on a standard wayang plan. We also provide setComplexityClass() on FunctionDescriptors that likewise will be used by the new cost model.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants