Skip to content

Debug the encoder for WhiteBox#1578

Open
MohsenTaheriShalmani wants to merge 9 commits into
masterfrom
debugEncoder4WB
Open

Debug the encoder for WhiteBox#1578
MohsenTaheriShalmani wants to merge 9 commits into
masterfrom
debugEncoder4WB

Conversation

@MohsenTaheriShalmani

Copy link
Copy Markdown
Contributor

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.

*
* Provides:
* - Common properties (endpoint, warmup, encoderType, randomness, dimension, initialized flag)
* - Common properties (endpoint, warmup, keys, dimension, encoderType, randomness, initialized flag)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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" }

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't rather be:

if(initialized){
   //already initialized. nothing to do
   return
}

)

val keysAndValues =
encoder.getAllParamsPathsAndEncodedValues()

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why breaking on a new line?

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