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

psutil is not installed #1028

Closed
2 tasks done
Onako2 opened this issue Nov 23, 2023 · 3 comments
Closed
2 tasks done

psutil is not installed #1028

Onako2 opened this issue Nov 23, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@Onako2
Copy link
Contributor

Onako2 commented Nov 23, 2023

Describe the bug

I cannot train my model with svc train -t
It shows that I have to install psutil and I did install it manually (somehow wasn't installed by the install.bat) and it still didn't work. I tried different versions of psutil and still didn't work. On Google Colab everything works perfectly fine

To Reproduce

I used the latest version on 2 different devices(one with and one without a GPU) and then I set up the environment with venv in Visual Studio Code. I did already all previous steps for training.

Additional context

Traceback (most recent call last):
  File "C:\Program Files\Python310\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Program Files\Python310\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Users\nebojsa\Desktop\so-vits-svc-fork-main\so-vits-svc-fork-main\.venv\Scripts\svc.exe\__main__.py", line 7, in <module>
  File "c:\Users\nebojsa\Desktop\so-vits-svc-fork-main\so-vits-svc-fork-main\.venv\lib\site-packages\click\core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "c:\Users\nebojsa\Desktop\so-vits-svc-fork-main\so-vits-svc-fork-main\.venv\lib\site-packages\click\core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "c:\Users\nebojsa\Desktop\so-vits-svc-fork-main\so-vits-svc-fork-main\.venv\lib\site-packages\click\core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "c:\Users\nebojsa\Desktop\so-vits-svc-fork-main\so-vits-svc-fork-main\.venv\lib\site-packages\click\core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "c:\Users\nebojsa\Desktop\so-vits-svc-fork-main\so-vits-svc-fork-main\.venv\lib\site-packages\click\core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "C:\Users\nebojsa\Desktop\so-vits-svc-fork-main\so-vits-svc-fork-main\src\so_vits_svc_fork\__main__.py", line 128, in train
    train(
  File "C:\Users\nebojsa\Desktop\so-vits-svc-fork-main\so-vits-svc-fork-main\src\so_vits_svc_fork\train.py", line 149, in train
    trainer.fit(model, datamodule=datamodule)
  File "c:\Users\nebojsa\Desktop\so-vits-svc-fork-main\so-vits-svc-fork-main\.venv\lib\site-packages\lightning\pytorch\trainer\trainer.py", line 544, in fit
    call._call_and_handle_interrupt(
  File "c:\Users\nebojsa\Desktop\so-vits-svc-fork-main\so-vits-svc-fork-main\.venv\lib\site-packages\lightning\pytorch\trainer\call.py", line 44, in _call_and_handle_interrupt
    return trainer_fn(*args, **kwargs)
  File "c:\Users\nebojsa\Desktop\so-vits-svc-fork-main\so-vits-svc-fork-main\.venv\lib\site-packages\lightning\pytorch\trainer\trainer.py", line 580, in _fit_impl
    self._run(model, ckpt_path=ckpt_path)
  File "c:\Users\nebojsa\Desktop\so-vits-svc-fork-main\so-vits-svc-fork-main\.venv\lib\site-packages\lightning\pytorch\trainer\trainer.py", line 950, in _run
    call._call_setup_hook(self)  # allow user to setup lightning_module in accelerator environment
  File "c:\Users\nebojsa\Desktop\so-vits-svc-fork-main\so-vits-svc-fork-main\.venv\lib\site-packages\lightning\pytorch\trainer\call.py", line 93, in _call_setup_hook
    _call_callback_hooks(trainer, "setup", stage=fn)
  File "c:\Users\nebojsa\Desktop\so-vits-svc-fork-main\so-vits-svc-fork-main\.venv\lib\site-packages\lightning\pytorch\trainer\call.py", line 208, in _call_callback_hooks
    fn(trainer, trainer.lightning_module, *args, **kwargs)
  File "c:\Users\nebojsa\Desktop\so-vits-svc-fork-main\so-vits-svc-fork-main\.venv\lib\site-packages\lightning\pytorch\callbacks\device_stats_monitor.py", line 72, in setup
    raise ModuleNotFoundError(
ModuleNotFoundError: `DeviceStatsMonitor` cannot log CPU stats as `psutil` is not installed. DistributionNotFound: The 'psutil' distribution was not found and is required by the application. HINT: Try running `pip install -U 'psutil'`

Version

4.1.32

Platform

Windows 11

Code of Conduct

  • I agree to follow this project's Code of Conduct.

No Duplicate

  • I have checked existing issues to avoid duplicates.
@Onako2 Onako2 added the bug Something isn't working label Nov 23, 2023
@34j
Copy link
Collaborator

34j commented Nov 24, 2023

Temporary solution would be to edit the code in train.py and remove DeviceStatsMonitor. That's a weird error🙃

@Onako2
Copy link
Contributor Author

Onako2 commented Nov 24, 2023

Temporary solution would be to edit the code in train.py and remove DeviceStatsMonitor. That's a weird error🙃

Will my device be overloaded with that? I just don't want that something weird happens

@34j
Copy link
Collaborator

34j commented Nov 25, 2023

DeviceStatsMonitor is optional but please ask the Lightning developers for further information as our code has little to do with this issue.

@Onako2 Onako2 closed this as completed Nov 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants