Skip to content

[EmoGen] run "bash Piano_train.sh" got "The maximum length exceeds 1280. Please resample the dataset" #210

@lajsean

Description

@lajsean

Followed its instruction on readMe.md file, when running bash Piano_train.sh on EmoGen, got following error. Anyone has any idea? Thanks in advance!

AssertionError: Caught AssertionError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/home/user1/Dev/ai-musicGen/muzic/emogen/venv-3.8.1/lib/python3.8/site-packages/torch/utils/data/_utils/worker.py", line 308, in _worker_loop
data = fetcher.fetch(index)
File "/home/user1/Dev/ai-musicGen/muzic/emogen/venv-3.8.1/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 51, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/user1/Dev/ai-musicGen/muzic/emogen/venv-3.8.1/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 51, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/user1/Dev/ai-musicGen/muzic/emogen/linear_decoder/controlled_task.py", line 44, in getitem
assert len(sample["source"]) <= self.args.truncated_length + 2, f"The maximum length exceeds {self.args.truncated_length}. Please resample the dataset."
AssertionError: The maximum length exceeds 1280. Please resample the dataset.

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