Skip to content
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

Simplify our methods/naming for inference on model/endpoints #455

Closed
brifordwylie opened this issue May 23, 2024 · 1 comment
Closed

Simplify our methods/naming for inference on model/endpoints #455

brifordwylie opened this issue May 23, 2024 · 1 comment
Assignees
Labels
api Python API Work architecture Software Architecture/Design endpoint SageWorks Endpoint model SageWorks Model

Comments

@brifordwylie
Copy link
Member

brifordwylie commented May 23, 2024

Right now we have a bunch of way to run predictions/inference on a model in SageWorks. This is good/fine but lets think about some simplification of the number of methods or some renaming of methods so that's it more obvious why it's different/useful to have that method.

Naming: auto_inference(), predictions(), inference_prediction(), predict(), inference()

List of current methods

  • Endpoint/EndpointCore

    • auto_inference(capture=False) -> pd.DataFrame # Pulls DataFrame from FeatureSet
    • inference(eval_df: pd.DataFrame, capture_uuid: str = None) -> pd.DataFrame: # Uses passed in DataFrame
    • predict(self, eval_df: pd.DataFrame) -> pd.DataFrame: # Low level method
  • Model/ModelCore

    • predictions(self, capture_uuid: str = "training_holdout") -> Union[pd.DataFrame, None]: # Retrieve predictions for model
    • inference_predictions(self, capture_uuid: str = "training_holdout") -> Union[pd.DataFrame, None]:
      """Retrieve the captured prediction results for this model"""
    • validation_predictions(self) -> Union[pd.DataFrame, None]:
      """Retrieve the captured prediction results for this model"""
  • Endpoint Utils

    • predictions_using_fs(end: Endpoint) -> pd.DataFrame: # Helper method
@brifordwylie brifordwylie added api Python API Work model SageWorks Model endpoint SageWorks Endpoint architecture Software Architecture/Design labels May 23, 2024
@brifordwylie brifordwylie added this to the SageWorks 0.7.0 milestone May 23, 2024
@brifordwylie brifordwylie self-assigned this May 23, 2024
@brifordwylie
Copy link
Member Author

brifordwylie commented May 28, 2024

Code Changes
Note: Methods that are 'internal' shouldn't be used/called by outside consumers.

  • Endpoint/EndpointCore

    • predict() is now internal --> _predict(). # Use auto_inference() or inference()
  • Model/ModelCore

    • predictions() has been removed
    • inference_predictions() --> get_inference_predictions()
    • validation_predictions(self) is now internal --> _get_validation_predictions()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Python API Work architecture Software Architecture/Design endpoint SageWorks Endpoint model SageWorks Model
Projects
Status: Complete
Development

No branches or pull requests

1 participant