{"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":"5b6937d6-ff59-58bb-90c8-3f9880e8a323","task_key":"default--v0~2e1~2e0~5fhf--5b6937d6-ff59-58bb-90c8-3f9880e8a323","task_revision_id":"1","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf 5b6937d6-ff59-58bb-90c8-3f9880e8a323","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import requests\\nfrom PIL import Image\\nimport io\\ndef task_func(url):\\n\",\"complete_prompt\":\"import requests\\nfrom PIL import Image\\nimport io\\n\\n\\ndef task_func(url):\\n    \\\"\\\"\\\"\\n    Fetches an image from a given URL and returns it as a PIL Image object.\\n\\n    Parameters:\\n    - url (str): The URL of the image to download. It should be a valid HTTP or\\n      HTTPS URL pointing directly to an image file.\\n\\n    Returns:\\n    - PIL.Image.Image: A PIL Image object representing the downloaded image. This\\n      object can be manipulated or displayed using PIL's image processing\\n      capabilities.\\n\\n    Raises:\\n    - ValueError: This exception is raised in the following scenarios:\\n        - The URL is invalid or cannot be reached within the timeout period (5 seconds).\\n        - The response from the server is not a successful HTTP status code (i.e., not in the range 200-299).\\n        - The content fetched from the URL is not a valid image format that can be handled by PIL.\\n\\n    Requirements:\\n    - requests\\n    - PIL\\n    - io\\n\\n    Example:\\n    >>> img = task_func('https://example.com/image.jpg')\\n    >>> isinstance(img, Image.Image)\\n    True\\n\\n    Note:\\n    - The function uses a timeout of 5 seconds for the HTTP request to prevent\\n      indefinite waiting in case of unresponsive URLs.\\n    - The function will not handle redirections or authentication scenarios. It\\n      expects a direct link to an image resource.\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Fetches an image from a given URL and returns it as a PIL Image object.\\nNote that: The function uses a timeout of 5 seconds for the HTTP request to prevent indefinite waiting in case of unresponsive URLs. The function will not handle redirections or authentication scenarios. It expects a direct link to an image resource.\\nThe function should raise the exception for: ValueError: This exception is raised in the following scenarios: The URL is invalid or cannot be reached within the timeout period (5 seconds). The response from the server is not a successful HTTP status code (i.e., not in the range 200-299). The content fetched from the URL is not a valid image format that can be handled by PIL.\\nThe function should output with:\\n    PIL.Image.Image: A PIL Image object representing the downloaded image. This\\n    object can be manipulated or displayed using PIL's image processing\\n    capabilities.\\nYou should write self-contained code starting with:\\n```\\nimport requests\\nfrom PIL import Image\\nimport io\\ndef task_func(url):\\n```\",\"libs\":\"['io', 'PIL', 'requests']\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://bigcode-bench.github.io/","history":"initial import","indexing_mode":"index","subproblems":[],"grids":[]}