Skip to content

Bug in func. shuffle in docqa/dataset.py #56

@YeDeming

Description

@YeDeming

Hi, Clark

Thanks for your opening source code!

I found a bug in shuffle function:

def shuffle_list_buckets(data, key, rng):
    start = 0
    end = 0
    while start < len(data):
        while end < len(data) and key(data[start]) == key(data[end]):
            end += 1
        rng.shuffle(data[start:end])
        start = end
    return data

rng.shuffle(data[start:end]) doesn't shuffle the the slice of data

Deming Ye

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions