IndexError: list assignment index out of range

#5
by gy19 - opened

run on slurm

edit comet/models/util.py like this:

def restore_list_order(sorted_list, sort_ids):
"""Restores the original ids of a given list."""
unsorted_list = [None for _ in range(len(sorted_list))]
for i, s in zip(sort_ids, sorted_list):
# unsorted_list[i] = s
unsorted_list.insert(i,s) <========modify this line===========
return unsorted_list

Sign up or log in to comment