-
Notifications
You must be signed in to change notification settings - Fork 7
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
[PNE-6511] Expose feature effects generation. #983
Conversation
At present, the backend will automatically generate feature effects upon successful training. However, that means old models lack them. Additionally, there may be circumstances where regenerating the values may be desired. The exposed endpoint will begin an asynchronous job which will generate new Shapley values, and replace the old ones.
shapley = data.get("result") | ||
if not shapley: | ||
return data |
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.
There was a bug in the existing code which caused it to blow up if there was no result
field, which would happen if either Shapley hadn't been run, or if the generation was in progress.
self.session.put_resource(path, {}, version=self._api_version) | ||
return self.get(uid, version=version) |
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.
The FeatureEffects
object returned by the generate
call will always be in progress and have no results yet. Additionally, as currently constructed, it doesn't provide an easy way to get the updated status: you'd have to retrieve the corresponding predictor, then call .feature_effects
on it. So instead, this does the get automatically.
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.
Something seems aesthetically weird here, but all lines up and presumably passes tests. Will you be adding a follow-on PR to devkit for e2es?
Revert "Merge pull request #983 from CitrineInformatics/feature/pne-6…
At present, the backend will automatically generate feature effects upon successful training. However, that means old models lack them. Additionally, there may be circumstances where regenerating the values may be desired.
The exposed endpoint will begin an asynchronous job which will generate new Shapley values, and replace the old ones.
PR Type:
Adherence to team decisions