Skip to content

Latest commit

 

History

History
164 lines (162 loc) · 3.81 KB

File metadata and controls

164 lines (162 loc) · 3.81 KB

Results of GPT-3.5 on HumanEval/34

Date: 18 July, 2023
Model: gpt-3.5-turbo
Temperature: 0.2
Passing runs: 10
Total runs: 10
Success rate: 100%

Prompt

Tokens: 99

def unique(l: list):
    """Return sorted unique elements in a list
    >>> unique([5, 3, 5, 2, 3, 3, 9, 0, 123])
    [0, 2, 3, 5, 9, 123]
    """

The above is an incomplete Python code fragment. Return the complete and correct code with no additional text.

Correct solution

def unique(l: list):
    """Return sorted unique elements in a list
    >>> unique([5, 3, 5, 2, 3, 3, 9, 0, 123])
    [0, 2, 3, 5, 9, 123]
    """return sorted(list(set(l)))

Unit tests

METADATA = {}


def check(candidate):
    assert candidate([5, 3, 5, 2, 3, 3, 9, 0, 123]) == [0, 2, 3, 5, 9, 123]

Runs

✅ Run 1

Start time: 2023-07-18 17:23:58
Duration: 3.1s
Completion tokens: 74
Result: Pass

def unique(l: list):
    """Return sorted unique elements in a list
    >>> unique([5, 3, 5, 2, 3, 3, 9, 0, 123])
    [0, 2, 3, 5, 9, 123]
    """
    return sorted(list(set(l)))

✅ Run 2

Start time: 2023-07-18 17:23:54
Duration: 3.23s
Completion tokens: 74
Result: Pass

def unique(l: list):
    """Return sorted unique elements in a list
    >>> unique([5, 3, 5, 2, 3, 3, 9, 0, 123])
    [0, 2, 3, 5, 9, 123]
    """
    return sorted(list(set(l)))

✅ Run 3

Start time: 2023-07-18 17:23:51
Duration: 3.11s
Completion tokens: 74
Result: Pass

def unique(l: list):
    """Return sorted unique elements in a list
    >>> unique([5, 3, 5, 2, 3, 3, 9, 0, 123])
    [0, 2, 3, 5, 9, 123]
    """
    return sorted(list(set(l)))

✅ Run 4

Start time: 2023-07-18 17:23:48
Duration: 3.06s
Completion tokens: 74
Result: Pass

def unique(l: list):
    """Return sorted unique elements in a list
    >>> unique([5, 3, 5, 2, 3, 3, 9, 0, 123])
    [0, 2, 3, 5, 9, 123]
    """
    return sorted(list(set(l)))

✅ Run 5

Start time: 2023-07-18 17:23:45
Duration: 3.22s
Completion tokens: 74
Result: Pass

def unique(l: list):
    """Return sorted unique elements in a list
    >>> unique([5, 3, 5, 2, 3, 3, 9, 0, 123])
    [0, 2, 3, 5, 9, 123]
    """
    return sorted(list(set(l)))

✅ Run 6

Start time: 2023-07-18 17:23:42
Duration: 3.22s
Completion tokens: 74
Result: Pass

def unique(l: list):
    """Return sorted unique elements in a list
    >>> unique([5, 3, 5, 2, 3, 3, 9, 0, 123])
    [0, 2, 3, 5, 9, 123]
    """
    return sorted(list(set(l)))

✅ Run 7

Start time: 2023-07-18 17:23:38
Duration: 3.55s
Completion tokens: 74
Result: Pass

def unique(l: list):
    """Return sorted unique elements in a list
    >>> unique([5, 3, 5, 2, 3, 3, 9, 0, 123])
    [0, 2, 3, 5, 9, 123]
    """
    return sorted(list(set(l)))

✅ Run 8

Start time: 2023-07-18 17:23:34
Duration: 3.42s
Completion tokens: 74
Result: Pass

def unique(l: list):
    """Return sorted unique elements in a list
    >>> unique([5, 3, 5, 2, 3, 3, 9, 0, 123])
    [0, 2, 3, 5, 9, 123]
    """
    return sorted(list(set(l)))

✅ Run 9

Start time: 2023-07-18 17:23:31
Duration: 3.3s
Completion tokens: 74
Result: Pass

def unique(l: list):
    """Return sorted unique elements in a list
    >>> unique([5, 3, 5, 2, 3, 3, 9, 0, 123])
    [0, 2, 3, 5, 9, 123]
    """
    return sorted(list(set(l)))

✅ Run 10

Start time: 2023-07-18 17:23:28
Duration: 2.82s
Completion tokens: 74
Result: Pass

def unique(l: list):
    """Return sorted unique elements in a list
    >>> unique([5, 3, 5, 2, 3, 3, 9, 0, 123])
    [0, 2, 3, 5, 9, 123]
    """
    return sorted(list(set(l)))