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

[BUG] Running nam in a fresh venv fails, missing requests and import errors #532

Open
Barabas5532 opened this issue Feb 7, 2025 · 1 comment
Labels
bug Something isn't working priority:low Low-priority issues

Comments

@Barabas5532
Copy link

Barabas5532 commented Feb 7, 2025

Describe the bug
Running nam in a fresh venv fails:

Traceback (most recent call last):
  File "/home/barabas/data3/projects/software/nam/.venv/bin/nam", line 5, in <module>
    from nam.cli import nam_gui
  File "/home/barabas/data3/projects/software/nam/trainer-repo/nam/__init__.py", line 26, in <module>
    from . import train  # noqa F401
    ^^^^^^^^^^^^^^^^^^^
  File "/home/barabas/data3/projects/software/nam/trainer-repo/nam/train/__init__.py", line 11, in <module>
    from . import gui  # noqa F401
    ^^^^^^^^^^^^^^^^^
  File "/home/barabas/data3/projects/software/nam/trainer-repo/nam/train/gui/__init__.py", line 15, in <module>
    import requests as _requests

To Reproduce
Steps to reproduce the behavior:

  1. Create a new venv and activate it
  2. Install pytorch with ROCm using pip from upstream: https://pytorch.org/get-started/locally/. It seems like ROCm is not supported in pypi or conda pytorch packages and the docs don't have any advice for AMD GPU users, so I used AMD's docs to set it up.
  3. git clone https://github.com/sdatkinson/neural-amp-modeler.git trainer-repo
  4. Install NAM for development with pip: pip install -e trainer-repo
  5. Run nam

After manually installing requests, there is another import error:

$ nam
Traceback (most recent call last):
  File "/home/barabas/data3/projects/software/nam/.venv/bin/nam", line 5, in <module>
    from nam.cli import nam_gui
ImportError: cannot import name 'nam_gui' from 'nam.cli' (/home/barabas/data3/projects/software/nam/trainer-repo/nam/cli.py)
$ grep "nam_gui" nam/cli.py
from nam.train.gui import run as _nam_gui  # noqa F401 Used as an entry point

Looks like the main branch is not in a working state at the moment.

Expected behavior
nam runs after installation

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Arch linux
  • Are you running locally or is this somethig that happens on Colab? Locally
  • Package version (or commit hash?) af1c4d5

Additional context
requests should be a regular dependency for the project, not a test dependency since it's used in https://github.com/sdatkinson/neural-amp-modeler/blob/main/nam/train/gui/__init__.py

@Barabas5532 Barabas5532 added bug Something isn't working priority:low Low-priority issues unread This issue is new and hasn't been seen by the maintainers yet labels Feb 7, 2025
@sdatkinson sdatkinson removed the unread This issue is new and hasn't been seen by the maintainers yet label Feb 14, 2025
@sdatkinson
Copy link
Owner

@Barabas5532 thanks for the Issue. I've pushed changes that fix the issue locally on my MacBook Pro, and some other issues identified by CI/CD have been fixed as well.

Can you pull the latest from main and let me know if it resolves your issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority:low Low-priority issues
Projects
None yet
Development

No branches or pull requests

2 participants