-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove feature possible values validation aside from type #44
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would validation on choices have to change as well (e.g. for decisions)
static/js/banditMl.js
Outdated
@@ -257,10 +257,6 @@ banditml.BanditAPI.prototype.validateAndFilterFeaturesInContext = function (cont | |||
Array.isArray(possibleValues), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove?
static/js/banditMl.js
Outdated
self.assert( | ||
possibleValues.includes(context[featureName]), | ||
`Value ${value} is not recognized among possible values for feature ${featureName}. Please update the possible values in Bandit ML.` | ||
); | ||
} else if (featureType === "P") { | ||
self.assert( | ||
Array.isArray(possibleValues), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thats true, we'll probably remove this field completely. removing!
static/js/banditMl.js
Outdated
self.assert( | ||
Array.isArray(possibleValues), | ||
`Feature ${featureName} is a product set, but its possible values is not an array. Update the model appropriately in Bandit ML.` | ||
); | ||
self.assert( | ||
typeof value === "string" || Array.isArray(value), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not now, but worthwhile to validate string or array specifically of strings?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good call, yes! ill add it in here since it's relatively trivial.
No description provided.