Debug the encoder for WhiteBox#1578
Open
MohsenTaheriShalmani wants to merge 9 commits into
Open
Conversation
arcuri82
requested changes
Jun 9, 2026
| * | ||
| * Provides: | ||
| * - Common properties (endpoint, warmup, encoderType, randomness, dimension, initialized flag) | ||
| * - Common properties (endpoint, warmup, keys, dimension, encoderType, randomness, initialized flag) |
Collaborator
There was a problem hiding this comment.
please add some more info in the comments on what those keys are
| abstract class AbstractProbabilistic400EndpointModel( | ||
| val endpoint: Endpoint, | ||
| var warmup: Int, | ||
| var modelKeys: List<String>? = null, |
Collaborator
There was a problem hiding this comment.
aren't keys unique? if so, why a list and not a set? or is ordering important? clarify in comments
| @@ -29,30 +31,48 @@ abstract class AbstractProbabilistic400EndpointModel( | |||
| protected var initialized: Boolean = false | |||
|
|
|||
| companion object { | |||
Collaborator
There was a problem hiding this comment.
companion object should be pushed up to the file. having it in the middle of field declarations make file harder to read
|
|
||
| if (dimension == null) { | ||
| require(inputVector.isNotEmpty()) { "Input vector cannot be empty" } | ||
|
|
Collaborator
There was a problem hiding this comment.
shouldn't rather be:
if(initialized){
//already initialized. nothing to do
return
}
| ) | ||
|
|
||
| val keysAndValues = | ||
| encoder.getAllParamsPathsAndEncodedValues() |
Collaborator
There was a problem hiding this comment.
why breaking on a new line?
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.
The model key is added to the classifier.
A model key for an endpoint consists of a list of strings, where each string represents the path to a parameter.
This ensures that the encoder always produces a consistent input vector for the classifier throughout the search process.