Skip to content

When Text2MotionDataset loads cached files (in tmp folder), length_list (self.length_arr) is not properly recreated. #103

@xaiseung

Description

@xaiseung

In mGPT/data/humanml/dataset_t2m.py, line 65~85:

new_name_list = []
length_list = []
data_dict = {}

# Fast loading
...
    with open(...) as file:
        name_list = pickle.load(file)
    for name in new_name_list:
        length_list.append(data_dict[name]['length'])

The cached list of names is stored as name_list, but in line 84, new_name_list (an empty list) is used.
This causes a problem where selt.reset_max_len() does not work as intended.

proposed fix

This can be resolve by:

    for name in name_list:
        length_list.append(data_dict[name]['length'])

I know the original code is from here, but the caching part seems to be added separetely, so I'm issuing this here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions