ModuleNotFoundError: No module named 'dlas.models.clip.model' #188

Closed
opened 2023-04-02 06:55:51 +00:00 by psr · 3 comments
Contributor

Hi

Thank you for this cool project and great documentation.

I am running into a ModuleNotFound error when attempting to use the training feature.

I noticed I can repro it quickly outside of the GUI by invoking directly like so:

python src/train.py --yaml training/mytest/train.yaml

And so I tried to dig around inside ai-voice-cloning/modules/dlas/dlas/trainer/networks.py . The best I could understand is that this dynamic import is supposed to be able to pick up some variable created by the @register_model decorator, but that's not happening. I am wondering if it might be because I'm running on an incompatible version of python (I am using Python 3.10.9).

Anyway this is the stack trace, if you have any ideas to try let me know.

I will keep trying to play around and if I figure it out I'll update the ticket.

Thank you!

23-04-02 06:48:00.235 - INFO: Random seed: 8209
23-04-02 06:48:00.552 - INFO: Number of training data elements: 25, iters: 1
23-04-02 06:48:00.552 - INFO: Total epochs needed: 100 for iters 100
Traceback (most recent call last):
  File "/home/psr/tts/ai-voice-cloning/src/train.py", line 64, in <module>
    train(config_path, args.launcher)
  File "/home/psr/tts/ai-voice-cloning/src/train.py", line 30, in train
    trainer.init(config_path, opt, launcher, '')
  File "/home/psr/tts/ai-voice-cloning/modules/dlas/dlas/train.py", line 180, in init
    self.model = ExtensibleTrainer(opt)
  File "/home/psr/tts/ai-voice-cloning/modules/dlas/dlas/trainer/ExtensibleTrainer.py", line 86, in __init__
    new_net = networks.create_model(
  File "/home/psr/tts/ai-voice-cloning/modules/dlas/dlas/trainer/networks.py", line 76, in create_model
    registered_fns = find_registered_model_fns()
  File "/home/psr/tts/ai-voice-cloning/modules/dlas/dlas/trainer/networks.py", line 55, in find_registered_model_fns
    importlib.import_module(mod_name)
  File "/home/psr/.asdf/installs/python/miniconda3-latest/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1004, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'dlas.models.clip.model'
Hi Thank you for this cool project and great documentation. I am running into a ModuleNotFound error when attempting to use the training feature. I noticed I can repro it quickly outside of the GUI by invoking directly like so: python src/train.py --yaml training/mytest/train.yaml And so I tried to dig around inside `ai-voice-cloning/modules/dlas/dlas/trainer/networks.py` . The best I could understand is that this dynamic import is supposed to be able to pick up some variable created by the @register_model decorator, but that's not happening. I am wondering if it might be because I'm running on an incompatible version of python (I am using Python 3.10.9). Anyway this is the stack trace, if you have any ideas to try let me know. I will keep trying to play around and if I figure it out I'll update the ticket. Thank you! ``` 23-04-02 06:48:00.235 - INFO: Random seed: 8209 23-04-02 06:48:00.552 - INFO: Number of training data elements: 25, iters: 1 23-04-02 06:48:00.552 - INFO: Total epochs needed: 100 for iters 100 Traceback (most recent call last): File "/home/psr/tts/ai-voice-cloning/src/train.py", line 64, in <module> train(config_path, args.launcher) File "/home/psr/tts/ai-voice-cloning/src/train.py", line 30, in train trainer.init(config_path, opt, launcher, '') File "/home/psr/tts/ai-voice-cloning/modules/dlas/dlas/train.py", line 180, in init self.model = ExtensibleTrainer(opt) File "/home/psr/tts/ai-voice-cloning/modules/dlas/dlas/trainer/ExtensibleTrainer.py", line 86, in __init__ new_net = networks.create_model( File "/home/psr/tts/ai-voice-cloning/modules/dlas/dlas/trainer/networks.py", line 76, in create_model registered_fns = find_registered_model_fns() File "/home/psr/tts/ai-voice-cloning/modules/dlas/dlas/trainer/networks.py", line 55, in find_registered_model_fns importlib.import_module(mod_name) File "/home/psr/.asdf/installs/python/miniconda3-latest/lib/python3.10/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1050, in _gcd_import File "<frozen importlib._bootstrap>", line 1027, in _find_and_load File "<frozen importlib._bootstrap>", line 1004, in _find_and_load_unlocked ModuleNotFoundError: No module named 'dlas.models.clip.model' ```

Did you run the appropriate setup script?

Did you run the appropriate setup script?
Author
Contributor

@psammites thanks for your reply. honestly I think No.. I have been testing so many projects that I dont remember anymore and i probably need to put more effort into repeatability and isolation.

You've inspired me to put something together towards this end. I will update this again after I reformat and reinstall my OS.

@psammites thanks for your reply. honestly I think No.. I have been testing so many projects that I dont remember anymore and i probably need to put more effort into repeatability and isolation. You've inspired me to put something together towards this end. I will update this again after I reformat and reinstall my OS.
Author
Contributor

I have solved the issue by implementing docker. I have made a pull request here #191

I have solved the issue by implementing docker. I have made a pull request here https://git.ecker.tech/mrq/ai-voice-cloning/pulls/191
psr closed this issue 2023-04-08 22:48:53 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: mrq/ai-voice-cloning#188
No description provided.