{"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":"02c2687b-6f42-50e0-9221-e117038c8862","task_key":"default--v0~2e1~2e0~5fhf--02c2687b-6f42-50e0-9221-e117038c8862","task_revision_id":"1","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf 02c2687b-6f42-50e0-9221-e117038c8862","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"from collections import Counter\\nimport logging\\ndef task_func(letter_list, element, log_path):\\n\",\"complete_prompt\":\"from collections import Counter\\nimport logging\\n\\ndef task_func(letter_list, element, log_path):\\n    \\\"\\\"\\\"\\n    Count the frequency of a particular letter in a given list of letters with logging.\\n\\n    Logs are written to a file named 'task_func.log' with encoding 'utf-8' and logging level DEBUG.\\n    The log file is created by the function or overwritten if already exists.\\n    For each function call the following is logged with the respective logging level:\\n        - info: f\\\"Function called with list: {letter_list} and element: {element}\\\"\\n        - error: if the element is not in the letter list\\n        - info: f\\\"Frequency of '{element}' is {element_frequency}\\\"\\n    \\n    After the last info has been logged, the logging is shutdown, such that all\\n    files are released.\\n\\n    Parameters:\\n    letter_list (list of str): The list of letters.\\n    element (str): The specific letter for which the frequency needs to be counted.\\n    log_path (str): the path to the folder in which to save the log file\\n\\n    Returns:\\n    int: The frequency of the letter.\\n\\n    Raises:\\n    ValueError: If element is not in letter_list.\\n\\n    Requirements:\\n    - collections\\n    - logging\\n\\n    Example:\\n    >>> task_func(['a', 'b', 'a', 'c', 'a'], 'a', log_path='./')\\n    3\\n    >>> with open('task_func.log') as log:\\n    ...     print(log.read())\\n    INFO:Function called with list: ['a', 'b', 'a', 'c', 'a'] and element: a\\n    INFO:Frequency of 'a' is 3\\n    <BLANKLINE>\\n\\n    >>> task_func(['x', 'y', 'z'], 'y', log_path='./')\\n    1\\n    >>> with open('task_func.log') as log:\\n    ...     print(log.read())\\n    INFO:Function called with list: ['x', 'y', 'z'] and element: y\\n    INFO:Frequency of 'y' is 1\\n    <BLANKLINE>\\n\\n    >>> try:\\n    ...     task_func(['x', 'y', 'z'], 'a', log_path='./')\\n    ... except:\\n    ...     with open('task_func.log') as log:\\n    ...        print(log.read())\\n    INFO:Function called with list: ['x', 'y', 'z'] and element: a\\n    ERROR:The element is not in the letter list.\\n    <BLANKLINE>\\n\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Count the frequency of a particular letter in a given list of letters with logging. Logs are written to a file named 'task_func.log' with encoding 'utf-8' and logging level DEBUG. The log file is created by the function or overwritten if already exists. For each function call the following is logged with the respective logging level: - info: f\\\"Function called with list: {letter_list} and element: {element}\\\" - error: if the element is not in the letter list - info: f\\\"Frequency of '{element}' is {element_frequency}\\\" After the last info has been logged, the logging is shutdown, such that all files are released. >>> task_func(['x', 'y', 'z'], 'y', log_path='./') 1 >>> with open('task_func.log') as log: ...     print(log.read()) INFO:Function called with list: ['x', 'y', 'z'] and element: y INFO:Frequency of 'y' is 1 <BLANKLINE> >>> try: ...     task_func(['x', 'y', 'z'], 'a', log_path='./') ... except: ...     with open('task_func.log') as log: ...        print(log.read()) INFO:Function called with list: ['x', 'y', 'z'] and element: a ERROR:The element is not in the letter list. <BLANKLINE>\\nThe function should raise the exception for: ValueError: If element is not in letter_list.\\nThe function should output with:\\n    int: The frequency of the letter.\\nYou should write self-contained code starting with:\\n```\\nfrom collections import Counter\\nimport logging\\ndef task_func(letter_list, element, log_path):\\n```\",\"libs\":\"['collections', 'logging']\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://bigcode-bench.github.io/","history":"initial import","indexing_mode":"index","subproblems":[],"grids":[]}