{"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":"594f4dfe-5cf3-5861-a7a5-a59025a59cd7","task_key":"default--v0~2e1~2e0~5fhf--594f4dfe-5cf3-5861-a7a5-a59025a59cd7","task_revision_id":"1","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf 594f4dfe-5cf3-5861-a7a5-a59025a59cd7","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import os\\nfrom datetime import datetime\\n# Constants\\nLOG_DIR = './logs'\\ndef task_func(metrics, filename, log_dir=LOG_DIR):\\n\",\"complete_prompt\":\"import os\\nfrom datetime import datetime\\n\\n# Constants\\nLOG_DIR = './logs'\\n\\ndef task_func(metrics, filename, log_dir=LOG_DIR):\\n    \\\"\\\"\\\"\\n    This function writes a dictionary of metrics to a specified log file, appending a timestamp to each entry.\\n    \\n    Parameters:\\n    - metrics (dict): A dictionary containing metric names as keys and their corresponding values.\\n    - filename (str): The name of the file to which the metrics will be logged.\\n    - log_dir (str, optional): The directory where the log file is stored. Default is './logs'.\\n    \\n    Returns:\\n    - bool: True if the metrics were successfully written to the file, False otherwise.\\n    \\n    Requirements:\\n    - os\\n    - datetime\\n    \\n    Examples:\\n    >>> metrics = {'accuracy': 0.98, 'loss': 0.05}\\n    >>> task_func(metrics, 'metrics.log')\\n    An error occurred: [Errno 2] No such file or directory: './logs/metrics.log'\\n    False\\n    \\n    >>> metrics = {'precision': 0.75, 'recall': 0.80}\\n    >>> task_func(metrics, 'evaluation.log')\\n    An error occurred: [Errno 2] No such file or directory: './logs/evaluation.log'\\n    False\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"This function writes a dictionary of metrics to a specified log file, appending a timestamp to each entry. >>> metrics = {'precision': 0.75, 'recall': 0.80} >>> task_func(metrics, 'evaluation.log') An error occurred: [Errno 2] No such file or directory: './logs/evaluation.log' False\\nThe function should output with:\\n    bool: True if the metrics were successfully written to the file, False otherwise.\\nYou should write self-contained code starting with:\\n```\\nimport os\\nfrom datetime import datetime\\n# Constants\\nLOG_DIR = './logs'\\ndef task_func(metrics, filename, log_dir=LOG_DIR):\\n```\",\"libs\":\"['datetime', 'os']\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://bigcode-bench.github.io/","history":"initial import","indexing_mode":"index","subproblems":[],"grids":[]}