plot_hypervolume_history
Generate a hypervolume history plot to visualize optimization performance based on specified reference points, enabling analysis of multi-objective optimization results.
Instructions
Return the hypervolume history plot as an image.
Args:
reference_point:
A list of reference points to calculate the hypervolume.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| reference_point | Yes |
Implementation Reference
- optuna_mcp/server.py:439-453 (handler)The main handler function for the 'plot_hypervolume_history' tool. It uses Optuna's built-in visualization to generate a hypervolume history plot based on the provided reference point and returns it as a PNG image via MCP's Image type.@mcp.tool() def plot_hypervolume_history( reference_point: list[float], ) -> Image: """Return the hypervolume history plot as an image. Args: reference_point: A list of reference points to calculate the hypervolume. """ fig = optuna.visualization.plot_hypervolume_history( mcp.study, reference_point=reference_point, ) return Image(data=plotly.io.to_image(fig), format="png")
- optuna_mcp/server.py:439-453 (registration)The @mcp.tool() decorator registers this function as the 'plot_hypervolume_history' MCP tool within the register_tools function.@mcp.tool() def plot_hypervolume_history( reference_point: list[float], ) -> Image: """Return the hypervolume history plot as an image. Args: reference_point: A list of reference points to calculate the hypervolume. """ fig = optuna.visualization.plot_hypervolume_history( mcp.study, reference_point=reference_point, ) return Image(data=plotly.io.to_image(fig), format="png")
- optuna_mcp/server.py:440-441 (schema)Input schema defined by function signature: reference_point as list[float]. Output is Image.def plot_hypervolume_history( reference_point: list[float],