{"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":"82f60e00-289a-5ff9-8db7-2fc23f884ebb","task_key":"default--v0~2e1~2e0~5fhf--82f60e00-289a-5ff9-8db7-2fc23f884ebb","task_revision_id":"1","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf 82f60e00-289a-5ff9-8db7-2fc23f884ebb","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import numpy as np\\nfrom difflib import SequenceMatcher\\nimport matplotlib.pyplot as plt\\ndef task_func(s_list, plot_path=None):\\n\",\"complete_prompt\":\"import numpy as np\\nfrom difflib import SequenceMatcher\\nimport matplotlib.pyplot as plt\\n\\ndef task_func(s_list, plot_path=None):\\n    \\\"\\\"\\\"\\n    Analyze and plot the average similarity scores of strings in a list.\\n\\n    This function calculates the average similarity score of each string compared to all other strings in the list using the SequenceMatcher ratio. If a plot path is provided, it saves the plot of these scores; otherwise, it just returns the scores.\\n\\n    Parameters:\\n    s_list (list of str): List of strings to analyze.\\n    plot_path (str, optional): Path to save the plot. If None, plot is not saved.\\n\\n    Returns:\\n    list: List of average similarity scores for each string in `s_list`.\\n\\n    Raises:\\n    ValueError: If `s_list` is not a list of strings.\\n    Return numpy.nan if the list contains a single element\\n\\n    Requirements:\\n    - numpy\\n    - difflib\\n    - matplotlib.pyplot as plt\\n\\n    Example:\\n    >>> s_list = ['apple', 'apples', 'ape', 'app', 'april']\\n    >>> avg_scores = task_func(s_list, 'similarity_plot.png')\\n    >>> expect = [0.7522727272727273, 0.6969696969696969, 0.6458333333333333, 0.6458333333333333, 0.5363636363636364]\\n    >>> np.all(np.isclose(avg_scores, expect, atol=1e-4))\\n    True\\n    >>> os.remove('similarity_plot.png')\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Analyze and plot the average similarity scores of strings in a list. This function calculates the average similarity score of each string compared to all other strings in the list using the SequenceMatcher ratio. If a plot path is provided, it saves the plot of these scores; otherwise, it just returns the scores.\\nThe function should raise the exception for: ValueError: If `s_list` is not a list of strings. Return numpy.nan if the list contains a single element\\nThe function should output with:\\n    list: List of average similarity scores for each string in `s_list`.\\nYou should write self-contained code starting with:\\n```\\nimport numpy as np\\nfrom difflib import SequenceMatcher\\nimport matplotlib.pyplot as plt\\ndef task_func(s_list, plot_path=None):\\n```\",\"libs\":\"['difflib', 'numpy', 'matplotlib']\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://bigcode-bench.github.io/","history":"initial import","indexing_mode":"index","subproblems":[],"grids":[]}