syntax error
When I try to enter these commands:
python jukebox/sample.py --model=1b_lyrics --name=sample_1b --levels=3 --sample_length_in_seconds=20 > --total_sample_length_in_seconds=180 --sr=44100 --n_samples=16 --hop_fraction=0.5,0.5,0.125
I get the following error:
File "jukebox/sample.py", line 45 print_once(f"Sampling {sample_tokens} tokens for [{start},{start+sample_tokens}]. Conditioning on {conditioning_tokens} tokens") ^ SyntaxError: invalid syntax
Any help is appreciated.
What version of python are you using?
3.8.1. It’s odd if I try to compile with python3 I get a torch error even though I have pytorch installed version 1.1 I think
sorry, i meant python 3.7.6
I encountered the same thing. I then performed the following to address the error
Modified line 45 from print_once(f"Sampling {sample_tokens} tokens for [{start},{start+sample_tokens}]. Conditioning on {conditioning_tokens} tokens") to print_once(f"Sampling {sample_tokens} tokens for [{start}, {start+sample_tokens}]. Conditioning on {conditioning_tokens} tokens") Added a space after the comma, not sure it was vital too.
I then updated the file permissions with chmod +x sample.py then from the directory run this command
python sample.py --model=5b_lyrics --name=sample_5b --levels=3 --sample_length_in_seconds=20 --total_sample_length_in_seconds=180 --sr=44100 --n_samples=6 --hop_fraction=0.5,0.5,0.125
Got this error in place of the line 45 SyntaxError: invalid syntax...so some progress
Using cuda False
THCudaCheck FAIL file=/opt/conda/conda-bld/pytorch_1556653114079/work/torch/csrc/cuda/Module.cpp line=33 error=38 : no CUDA-capable device is detected
Caught error during NCCL init (attempt 0 of 5): cuda runtime error (38) : no CUDA-capable device is detected at /opt/conda/conda-bld/pytorch_1556653114079/work/torch/csrc/cuda/Module.cpp:33
Caught error during NCCL init (attempt 1 of 5): trying to initialize the default process group twice!
Caught error during NCCL init (attempt 2 of 5): trying to initialize the default process group twice!
Caught error during NCCL init (attempt 3 of 5): trying to initialize the default process group twice!
Caught error during NCCL init (attempt 4 of 5): trying to initialize the default process group twice!
Traceback (most recent call last):
File "sample.py", line 275, in
Yup, also seeing
Caught error during NCCL init (attempt 0 of 5): trying to initialize the default process group twice!
Caught error during NCCL init (attempt 1 of 5): trying to initialize the default process group twice!
Caught error during NCCL init (attempt 2 of 5): trying to initialize the default process group twice!
Caught error during NCCL init (attempt 3 of 5): trying to initialize the default process group twice!
Caught error during NCCL init (attempt 4 of 5): trying to initialize the default process group twice!
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
<ipython-input-21-ec93396d27b8> in <module>()
9 from jukebox.utils.dist_utils import setup_dist_from_mpi
10 from jukebox.utils.torch_utils import empty_cache
---> 11 rank, local_rank, device = setup_dist_from_mpi()
1 frames
/usr/local/lib/python3.7/dist-packages/jukebox/utils/dist_utils.py in _setup_dist_from_mpi(master_addr, backend, port, n_attempts, verbose)
99 pass
100
--> 101 raise RuntimeError("Failed to initialize NCCL")
RuntimeError: Failed to initialize NCCL