Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
lajsean opened this issue Feb 2, 2025 · 1 comment

Comments

@lajsean
Copy link

lajsean commented Feb 2, 2025

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.

@lajsean lajsean changed the title [EmoGen] bash Piano_train.sh got "The maximum length exceeds 1280. Please resample the dataset" [EmoGen] run "bash Piano_train.sh" got "The maximum length exceeds 1280. Please resample the dataset" Feb 2, 2025
@lajsean
Copy link
Author

lajsean commented Feb 9, 2025

finally worked around it by using default value 8192 to replace 1280

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant