Repository navigation
feat: support starting index in CultivationPropagationModel prediction - #10
Merged
Merged
Conversation
…el prediction functionality
wclaus22
force-pushed
the
feat/starting-index
branch
from
February 6, 2025 20:51
8c093a5 to
b808f8b
Compare
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.
Overview
To enable the prediction using the startingIndex functionality, I needed to add the steps to the prediction request formatted in the CultivationPropagationPreprocessor, the steps are simply generated from the timestamps
the validations stay the same, ultimately the users only have to specify the starting_index in the PredictionConfig that is an input to the
model.predictmethod:in the returned dict from the predict function, the timestamps will be listed and where no prediction happened
nullwill appear, while after the defined starting_index the predicted X variables will start to appear:{ "VCD": { "values": [ null, null, null, null, null, null, null, null, null, 2.879112482070923, 2.4005997326441006, 1.9871806082628867, 1.681387192593827, 1.4050851085900333, 1.194962512785351 ], "upperBound": [ null, null, null, null, null, null, null, null, null, 2.879112482070923, 2.493029799377218, 2.120593437479122, 1.8562090157041424, 1.6714378289059812, 1.4606777007638796 ], "lowerBound": [ null, null, null, null, null, null, null, null, null, 2.879112482070923, 2.3057709871156935, 1.8248368874560694, 1.4678880165432826, 1.1231916636850299, 0.8331586939798415 ] } }Main Changes
_input_processing.CultivationPropagationPreprocessor
self.prediction_config.starting_index_utils.Instance
entities.CultivationPropagationModel
starting_indexcoming from thePredictionConfigto thePredictionRequestConfig.newconstructor s.t. everything is properly hooked up on the frontend of the SDK