Skip to content

Add method to log custom visualizations in TrackerΒ #149

@mibarguen

Description

@mibarguen

Is your feature request related to a problem? Please describe.
My feature is not related to a specific problem. However, it would be useful to have the ability to store custom plots that evaluate the results of each experiment. For example, we could store Shapley Feature Explanation plots or simple feature importance plots for each experiment. It would be helpful to have the ability to upload these images/plots as part of each trial.

Describe the solution you'd like

with Tracker.create(display_name="Preprocessing", sagemaker_boto_client=sm) as tracker:
    feat_importances = pd.DataFrame(model.feature_importances_, index=iris.feature_names, columns=["Importance"])
    feat_importances.sort_values(by='Importance', ascending=False, inplace=True)
    ft_importances_plot = feat_importances.plot(kind='bar', figsize=(8,6))
    tracker.log_figure(name="feature-importances", ft_importances_plot)

Ideally, the Tracker class would have a method called log_figure that would allow us to log any figure that we would consider useful.

Describe alternatives you've considered
I have considered using the log_artifact method of the Tracker class. This method is not implemented specifically for visualizations.

Additional context
I believe Comet has this feature implemented Experiment.log_figure method. It would be extremely useful to add this feature to sagemaker-experiments.

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions