mrpep / encodecgpt

1 stars 0 forks source link

ModuleNotFoundError: No module named 'encodecmae' #1

Open buscon opened 9 months ago

buscon commented 9 months ago

I downloaded the repo and sucessfully installed the dependencies with: pip install -e .

but when I run the scripts I get this error: ./scripts/run_lm_pretraining.sh

Traceback (most recent call last): File "/home/marcello/.local/bin/ginpipe", line 8, in sys.exit(main()) File "/home/marcello/.local/lib/python3.10/site-packages/ginpipe/run.py", line 19, in main state = setup_gin(flags) File "/home/marcello/.local/lib/python3.10/site-packages/ginpipe/core.py", line 311, in setup_gin gin_configure_externals(flags) File "/home/marcello/.local/lib/python3.10/site-packages/ginpipe/core.py", line 68, in gin_configure_externals module, imported_objs = import_module(k) File "/home/marcello/.local/lib/python3.10/site-packages/ginpipe/core.py", line 36, in import_module elif importlib.util.find_spec(k) is not None: File "/usr/lib/python3.10/importlib/util.py", line 94, in find_spec parent = import(parent_name, fromlist=['path']) ModuleNotFoundError: No module named 'encodecmae'

mrpep commented 9 months ago

Hi!, you can install the missing library following the instructions here https://github.com/habla-liaa/encodecmae

buscon commented 9 months ago

thank you, I installed encodecmae and also two more missing libraries ( torchinfo, audiogen). I added this information in the setup.cfg and in a (new) README. I can open a PR for that, if you open that change.

BTW even with those libraries I get an error from the audiogen package:

Traceback (most recent call last): File "/home/marcello/.local/bin/ginpipe", line 8, in sys.exit(main()) File "/home/marcello/.local/lib/python3.10/site-packages/ginpipe/run.py", line 19, in main state = setup_gin(flags) File "/home/marcello/.local/lib/python3.10/site-packages/ginpipe/core.py", line 311, in setup_gin gin_configure_externals(flags) File "/home/marcello/.local/lib/python3.10/site-packages/ginpipe/core.py", line 68, in gin_configure_externals module, imported_objs = import_module(k) File "/home/marcello/.local/lib/python3.10/site-packages/ginpipe/core.py", line 36, in import_module elif importlib.util.find_spec(k) is not None: File "/usr/lib/python3.10/importlib/util.py", line 94, in find_spec parent = import(parent_name, fromlist=['path']) File "/home/marcello/.local/lib/python3.10/site-packages/audiogen/init.py", line 2, in from .sampler import frame_rate File "/home/marcello/.local/lib/python3.10/site-packages/audiogen/sampler.py", line 64 except IOError, e: ^^^^^^^^^^ SyntaxError: multiple exception types must be parenthesized

mrpep commented 9 months ago

my bad, I made an update to the code. Audiogen is not an external library so uninstall it and update this repository. I think it should work.

buscon commented 9 months ago

thanks for the info and update.

Now I get the following error: 2023/11/22 > 21:55:19 INFO Started execution of pipeline 2023/11/22 > 21:55:19 INFO Running set_seed 2023/11/22 > 21:55:19 INFO Running load_dataset 0it [00:00, ?it/s] Traceback (most recent call last): File "/home/marcello/.local/bin/ginpipe", line 8, in sys.exit(main()) File "/home/marcello/.local/lib/python3.10/site-packages/ginpipe/run.py", line 20, in main execute_pipeline(state, is_main=True) File "/home/marcello/.local/lib/python3.10/site-packages/gin/config.py", line 1605, in gin_wrapper utils.augment_exception_message_and_reraise(e, err_str) File "/home/marcello/.local/lib/python3.10/site-packages/gin/utils.py", line 41, in augment_exception_message_and_reraise raise proxy.with_traceback(exception.traceback) from None File "/home/marcello/.local/lib/python3.10/site-packages/gin/config.py", line 1582, in gin_wrapper return fn(*new_args, new_kwargs) File "/home/marcello/.local/lib/python3.10/site-packages/ginpipe/core.py", line 344, in execute_pipeline state = t(state) File "/home/marcello/.local/lib/python3.10/site-packages/gin/config.py", line 1605, in gin_wrapper utils.augment_exception_message_and_reraise(e, err_str) File "/home/marcello/.local/lib/python3.10/site-packages/gin/utils.py", line 41, in augment_exception_message_and_reraise raise proxy.with_traceback(exception.traceback) from None File "/home/marcello/.local/lib/python3.10/site-packages/gin/config.py", line 1582, in gin_wrapper return fn(*new_args, *new_kwargs) File "/home/marcello/Documents/Softwares/encodecmae/encodecmae/tasks/data/init.py", line 22, in load_dataset dfs = [fn() for fn in reader_fn] File "/home/marcello/Documents/Softwares/encodecmae/encodecmae/tasks/data/init.py", line 22, in dfs = [fn() for fn in reader_fn] File "/home/marcello/.local/lib/python3.10/site-packages/gin/config.py", line 670, in scoping_wrapper return fn_or_cls(args, kwargs) File "/home/marcello/.local/lib/python3.10/site-packages/gin/config.py", line 1605, in gin_wrapper utils.augment_exception_message_and_reraise(e, err_str) File "/home/marcello/.local/lib/python3.10/site-packages/gin/utils.py", line 41, in augment_exception_message_and_reraise raise proxy.with_traceback(exception.traceback) from None File "/home/marcello/.local/lib/python3.10/site-packages/gin/config.py", line 1582, in gin_wrapper return fn(*new_args, **new_kwargs) File "/home/marcello/Documents/Softwares/encodecmae/encodecmae/tasks/data/init.py", line 76, in read_audiodir df['rel_path'] = df['filename'].apply(lambda x: str(Path(x).relative_to(dataset_path[0]))) File "/home/marcello/.local/lib/python3.10/site-packages/pandas/core/frame.py", line 3761, in getitem indexer = self.columns.get_loc(key) File "/home/marcello/.local/lib/python3.10/site-packages/pandas/core/indexes/range.py", line 349, in get_loc raise KeyError(key) KeyError: 'filename' In call to configurable 'read_audiodir' (<function read_audiodir at 0x7fa698cbf490>) in scope 'nsynth_24k' In call to configurable 'load_dataset' (<function load_dataset at 0x7fa698cbf7f0>) In call to configurable 'execute_pipeline' (<function execute_pipeline at 0x7fa75c0bef80>)