{"kind":"task","effective_mode":"full","benchmark":{"kind":"benchmark","effective_mode":"full","slug":"bigcodebench","formal_name":"BigCodeBench","introduction":"BigCodeBench poses 1,140 function-level tasks drawn across 139 libraries. It tests whether a model can compose several real APIs correctly rather than write one self-contained function.","introduction_ja":"","introduction_en":"","category":"Category not supplied","task_count":null,"acquisition_status":"Acquisition status not supplied","official_url":"https://bigcode-bench.github.io/","indexing_mode":"index","profile":{"resources":[],"task_format":"","scoring":"","metric":"","size":"","answer_access":"","license":"","citation":"","maintainer":"","released":"","why_hard":"","related":[],"history":"","construction":"","limitations":"","saturation":"","scores":[]}},"task_id":"4d1a57c1-0431-5720-a0e4-d8040fd613e1","task_key":"default--v0~2e1~2e0~5fhf--4d1a57c1-0431-5720-a0e4-d8040fd613e1","task_revision_id":"1","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf 4d1a57c1-0431-5720-a0e4-d8040fd613e1","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import numpy as np\\nfrom sklearn.decomposition import PCA\\nimport matplotlib.pyplot as plt\\ndef task_func(data, save_plot=False, plot_path=None):\\n\",\"complete_prompt\":\"import numpy as np\\nfrom sklearn.decomposition import PCA\\nimport matplotlib.pyplot as plt\\n\\n\\ndef task_func(data, save_plot=False, plot_path=None):\\n    \\\"\\\"\\\"\\n    Unzip a list of objects and their 3D coordinates, run PCA to reduce the dimensionality to 2D, \\n    and depending on the value of save_plot parameter, either save the plot to the provided path and \\n    return the 2D coordinates or return the 2D coordinates and the plot's Axes.\\n\\n    Parameters:\\n    - data (list of tuple): A list containing tuples of an object and its 3D coordinates.\\n    - save_plot (bool, optional): If True, the plot will be saved. Defaults to False.\\n    - plot_path (str, optional): The path where the plot will be saved. Required if save_plot is True.\\n\\n    Returns:\\n    - coordinates_2d (numpy.ndarray): The 2D coordinates after applying PCA.\\n    - ax (matplotlib.axes._axes.Axes, optional): The plot's Axes if save_plot is True.\\n\\n    Requirements:\\n    - numpy\\n    - sklearn.decomposition.PCA\\n    - matplotlib.pyplot\\n\\n    Raises:\\n    - ValueError: If save_plot is True but plot_path is not provided.\\n\\n    Example:\\n    >>> import tempfile\\n    >>> temp_dir = tempfile.mkdtemp()\\n    >>> task_func([('A', 1, 1, 1), ('B', 2, 2, 2)], save_plot=True, plot_path=f\\\"{temp_dir}/temp_plot.png\\\")[0]\\n    array([[ 8.66025404e-01,  4.09680598e-17],\\n           [-8.66025404e-01,  4.09680598e-17]])\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Unzip a list of objects and their 3D coordinates, run PCA to reduce the dimensionality to 2D, and depending on the value of save_plot parameter, either save the plot to the provided path and return the 2D coordinates or return the 2D coordinates and the plot's Axes.\\nThe function should raise the exception for: ValueError: If save_plot is True but plot_path is not provided.\\nThe function should output with:\\n    coordinates_2d (numpy.ndarray): The 2D coordinates after applying PCA.\\n    ax (matplotlib.axes._axes.Axes, optional): The plot's Axes if save_plot is True.\\nYou should write self-contained code starting with:\\n```\\nimport numpy as np\\nfrom sklearn.decomposition import PCA\\nimport matplotlib.pyplot as plt\\ndef task_func(data, save_plot=False, plot_path=None):\\n```\",\"libs\":\"['numpy', 'matplotlib', 'sklearn']\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://bigcode-bench.github.io/","history":"initial import","indexing_mode":"index","subproblems":[],"grids":[]}