{"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":"3c3d02bb-ec39-54ae-83f2-10560aad329c","task_key":"default--v0~2e1~2e0~5fhf--3c3d02bb-ec39-54ae-83f2-10560aad329c","task_revision_id":"1","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf 3c3d02bb-ec39-54ae-83f2-10560aad329c","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import pandas as pd\\nimport numpy as np\\nfrom sklearn.preprocessing import LabelEncoder\\ndef task_func(num_samples, countries=['Russia', 'China', 'USA', 'India', 'Brazil'], \\n           ages=np.arange(18, 60), genders=['Male', 'Female'], rng_seed=None):\\n\",\"complete_prompt\":\"import pandas as pd\\nimport numpy as np\\nfrom sklearn.preprocessing import LabelEncoder\\n\\ndef task_func(num_samples, countries=['Russia', 'China', 'USA', 'India', 'Brazil'], \\n           ages=np.arange(18, 60), genders=['Male', 'Female'], rng_seed=None):\\n    \\\"\\\"\\\"\\n    Generate a demographic dataset with information about people from different countries, their age, and gender. \\n    Genders are encoded using sklearn LabelEncoder.\\n    Datapoints are sampled from the lists using a numpy.random.default_rng with seed: rng_seed.\\n\\n    Parameters:\\n    num_samples (int): The number of samples to generate.\\n    countries (list of str): A list of country names to use in the dataset. Default is ['Russia', 'China', 'USA', 'India', 'Brazil'].\\n    ages (array of int): An array of ages to use in the dataset. Default is np.arange(18, 60).\\n    genders (list of str): A list of genders to use in the dataset. Default is ['Male', 'Female'].\\n    rng_seed: seed for the random number generator\\n    \\n    Returns:\\n    DataFrame: A pandas DataFrame with the demographics data.\\n\\n    Raises:\\n    - ValueError: If num_samples is not an integer.\\n\\n    Requirements:\\n    - pandas\\n    - numpy\\n    - sklearn.preprocessing.LabelEncoder\\n\\n    Example:\\n    >>> demographics = task_func(5, rng_seed=31)\\n    >>> print(demographics)\\n      Country  Age  Gender\\n    0     USA   46       0\\n    1  Brazil   21       1\\n    2     USA   37       1\\n    3  Russia   32       1\\n    4     USA   46       0\\n\\n    >>> demographics = task_func(5, countries=['Austria', 'Germany'], rng_seed=3)\\n    >>> print(demographics)\\n       Country  Age  Gender\\n    0  Germany   51       1\\n    1  Austria   54       1\\n    2  Austria   42       0\\n    3  Austria   19       1\\n    4  Austria   21       1\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Generate a demographic dataset with information about people from different countries, their age, and gender. Genders are encoded using sklearn LabelEncoder. Datapoints are sampled from the lists using a numpy.random.default_rng with seed: rng_seed. >>> demographics = task_func(5, countries=['Austria', 'Germany'], rng_seed=3) >>> print(demographics) Country  Age  Gender 0  Germany   51       1 1  Austria   54       1 2  Austria   42       0 3  Austria   19       1 4  Austria   21       1\\nThe function should raise the exception for: ValueError: If num_samples is not an integer.\\nThe function should output with:\\n    DataFrame: A pandas DataFrame with the demographics data.\\nYou should write self-contained code starting with:\\n```\\nimport pandas as pd\\nimport numpy as np\\nfrom sklearn.preprocessing import LabelEncoder\\ndef task_func(num_samples, countries=['Russia', 'China', 'USA', 'India', 'Brazil'], \\n           ages=np.arange(18, 60), genders=['Male', 'Female'], rng_seed=None):\\n```\",\"libs\":\"['pandas', 'numpy', 'sklearn']\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://bigcode-bench.github.io/","history":"initial import","indexing_mode":"index","subproblems":[],"grids":[]}