Open PradeepKadubandi opened 1 year ago
Thanks for pointing this out. The below code snippet should hopefully fix this, please let me know if you run into further issues. I'll push this to GitHub asap.
cumulative_max_instance_id = 0
global_instance_ids_offset = {}
for sequence in global_instance_ids:
if not global_instance_ids[sequence]:
continue
max_instance_id = max(global_instance_ids[sequence])
global_instance_ids_offset[sequence] = [
inst_id + cumulative_max_instance_id
for inst_id in global_instance_ids[sequence]
]
cumulative_max_instance_id += max_instance_id
if not global_instance_ids_offset:
return {}
For some training data, the above method causes the error as mentioned.
The sample context and sequence for which this happens: context: 10724020115992582208_7660_400_7680_400 sequence: 15672339233166359051
The issue happens because all the protos in the above sequence have empty lists for local and global ids; in such a case, the code attempts to call max with an empty sequence.
This is the call stack (the relevant parts) if helpful: