microsoft / otdd

Optimal Transport Dataset Distance
MIT License
151 stars 48 forks source link

"Unexpected keyword argument" bug in last commit #6

Closed addtt closed 3 years ago

addtt commented 3 years ago

Hi! The refactoring in the last commit seems to have introduced a small bug where load_full_dataset() (here) is called with an argument reindex_start that does not exist (e.g. here and in a couple other places).

I'm not sure, but it might be enough to add reindex_start=None to the signature of load_full_dataset() and then change this into the following:

if type(reindex) is bool:
    if reindex_start is None:
        reindex_start = 0
    reindex_vals = range(reindex_start, reindex_start + len(labels))

Does it make sense? Thanks!

dmelis commented 3 years ago

Hi, good catch. I forgot to push the latest version of utils.py, which introduced this bug. Should be fixed by the latest push.