Spaces:
Running
on
A100
Duplicated Space errors after submit
Hi. I'm running the duplicated Space on the A100. After submit, it runs for a few minutes and then returns an error. Do you have any ideas?
Here's a bit from the log:
0it [00:00, ?it/s]
0it [00:00, ?it/s]
Traceback (most recent call last):
File "/home/user/app/inference/infer.py", line 203, in
ids = raw_output[0].cpu().numpy()
NameError: name 'raw_output' is not defined
Error occurred: Command '['python', 'infer.py', '--stage1_model', 'm-a-p/YuE-s1-7B-anneal-en-cot', '--stage2_model', 'm-a-p/YuE-s2-1B-general', '--genre_txt', '/tmp/genre_8_lt9czc.txt', '--lyrics_txt', '/tmp/lyrics_zna60w6q.txt', '--run_n_segments', '2', '--stage2_batch_size', '4', '--output_dir', './output', '--cuda_idx', '0', '--max_new_tokens', '1500']' returned non-zero exit status 1.
Temporary files deleted.
Traceback (most recent call last):
File "/home/user/app/app.py", line 144, in infer
subprocess.run(command, check=True, env=env)
File "/home/user/.pyenv/versions/3.10.16/lib/python3.10/subprocess.py", line 526, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['python', 'infer.py', '--stage1_model', 'm-a-p/YuE-s1-7B-anneal-en-cot', '--stage2_model', 'm-a-p/YuE-s2-1B-general', '--genre_txt', '/tmp/genre_8_lt9czc.txt', '--lyrics_txt', '/tmp/lyrics_zna60w6q.txt', '--run_n_segments', '2', '--stage2_batch_size', '4', '--output_dir', './output', '--cuda_idx', '0', '--max_new_tokens', '1500']' returned non-zero exit status 1.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/user/.pyenv/versions/3.10.16/lib/python3.10/site-packages/gradio/queueing.py", line 625, in process_events
response = await route_utils.call_process_api(
File "/home/user/.pyenv/versions/3.10.16/lib/python3.10/site-packages/gradio/route_utils.py", line 322, in call_process_api
output = await app.get_blocks().process_api(
File "/home/user/.pyenv/versions/3.10.16/lib/python3.10/site-packages/gradio/blocks.py", line 2044, in process_api
result = await self.call_function(
File "/home/user/.pyenv/versions/3.10.16/lib/python3.10/site-packages/gradio/blocks.py", line 1591, in call_function
prediction = await anyio.to_thread.run_sync( # type: ignore
File "/home/user/.pyenv/versions/3.10.16/lib/python3.10/site-packages/anyio/to_thread.py", line 56, in run_sync
return await get_async_backend().run_sync_in_worker_thread(
File "/home/user/.pyenv/versions/3.10.16/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 2461, in run_sync_in_worker_thread
return await future
File "/home/user/.pyenv/versions/3.10.16/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 962, in run
result = context.run(func, *args)
File "/home/user/.pyenv/versions/3.10.16/lib/python3.10/site-packages/gradio/utils.py", line 883, in wrapper
response = f(*args, **kwargs)
File "/home/user/app/app.py", line 168, in infer
raise gr.Error(f"Error occurred: {e}")
gradio.exceptions.Error: "Error occurred: Command '['python', 'infer.py', '--stage1_model', 'm-a-p/YuE-s1-7B-anneal-en-cot', '--stage2_model', 'm-a-p/YuE-s2-1B-general', '--genre_txt', '/tmp/genre_8_lt9czc.txt', '--lyrics_txt', '/tmp/lyrics_zna60w6q.txt', '--run_n_segments', '2', '--stage2_batch_size', '4', '--output_dir', './output', '--cuda_idx', '0', '--max_new_tokens', '1500']' returned non-zero exit status 1."
same
Hello there ! The ids = raw_output[0].cpu().numpy() error is generally caused by the lyrics not formatted correctly.
In my experience, you need at least 2 sections, annotated with brackets.
for example:
[verse]
blabla bla bla yeah
[chorus]
lalala
any other type of annotation, like parentheses won't work
I'll try it again, but I'm pretty sure I had it formatted like that. I think I will use the example and see if that runs.
Have you updated your duplicated space with the last changes ? If not you can synchronize automatically from the Space's Settings page, at the "Synchronize duplicated Space" section
Ah, I didn't notice that. I will do that after this test run. I just used lyrics from the examples text.
Works now, thanks!
Awesome !