ML cost model integration for Wayang#765
Open
mspruc wants to merge 14 commits into
Open
Conversation
…e checks to one hot and onnx, add onnx model
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Wayang currently is based on manually tuned cost models, this can be time consuming to manually tune therefore we implement
DefaultPointwiseCostwhich is called using Wayangs nativeEstimatableCostFactory, you just need to provide it to WayangsConfigurationcost_model.onnxa pretrained sample model, based off a tree convolutional neural network for cost prediction, we also allow you to manually set a model withconfig.setProperty("wayang.ml.model.file", modelPath);TreeNode,TreeEncoder,TreeDecoder,OneHotEncoder,OneHotMappingsencoding schemes which allows capturing deep relationships within a plancost_model.onnxcalls via OnnxRuntimeand various other features. We include
WordCountIntegrationTestas an example of how to call it on a standard wayang plan. We also providesetComplexityClass()onFunctionDescriptors that likewise will be used by the new cost model.