Skip to content
The Chat Archive
Claudeclaude-sonnet-4-20250514· Anthropic LMArena Human Preference 140K

i have this structure using the uv package manager but when i run uv run evaluate, I get…

From a Chatbot Arena battleThe same person sent this prompt to two anonymous models at once. Compare it with DeepSeekdeepseek-v3-0324’s answer.
  1. User

    i have this structure using the uv package manager but when i run uv run evaluate, I get ModuleNotFoundError: No module named 'my_module'. What's the issue?

    [build-system] requires = ["setuptools>=61.0"] build-backend = "setuptools.build_meta"

    [project] name = "XXX" version = "0.1.0" description = "YYY" readme = "README.md" requires-python = ">=3.12" dependencies = [ "matplotlib>=3.10.1", "pywin32 >= 301 ; sys_platform == 'win32'", "pyyaml>=6.0.2", "pandas>=2.2.3", "tensorboard>=2.19.0", "lightning==2.4", "numpy>2", "hydra-core>=1.3.2", "scipy>=1.15.2", ]

    [project.optional-dependencies] cpu = ["torch>=2.6.0"] gpu = ["torch>=2.6.0"]

    [project.scripts] evaluate = "my_module.evaluate:main"

    [dependency-groups] dev = ["black>=25.1.0"]

    [tool.setuptools.packages.find] where = ["my_module"]

    [tool.uv] conflicts = [[{ extra = "cpu" }, { extra = "gpu" }]]

    [tool.uv.sources] torch = [ { index = "pytorch-cpu", extra = "cpu" }, { index = "pytorch-cu128", extra = "gpu" }, ]

    [[tool.uv.index]] name = "pytorch-cpu" url = "https://download.pytorch.org/whl/cpu" explicit = true

    [[tool.uv.index]] name = "pytorch-cu128" url = "https://download.pytorch.org/whl/cu128" explicit = true

  2. Assistant

    The issue is with your setuptools package discovery configuration. You have:

    [tool.setuptools.packages.find]
    where = ["my_module"]
    

    This tells setuptools to look inside a directory called my_module for packages, but based on your script entry point my_module.evaluate:main, it appears that my_module itself is the package you want to include.

    Here are two ways to fix this:

    Option 1: Fix the package discovery (recommended) Change your configuration to:

    [tool.setuptools.packages.find]
    where = ["."]
    include = ["my_module*"]
    

    This tells setuptools to look in the current directory and include the my_module package.

    Option 2: Use explicit package listing Replace the [tool.setuptools.packages.find] section with:

    [tool.setuptools]
    packages = ["my_module"]
    

    Make sure your directory structure looks like this:

    your-project/
    ├── pyproject.toml
    ├── my_module/
    │   ├── __init__.py
    │   └── evaluate.py
    └── README.md
    

    After making this change, you may need to reinstall the package in development mode:

    uv pip install -e .
    

    Then uv run evaluate should work correctly.

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.