Skip to content

[Bug] ModuleNotFoundError: No module named 'clt_forge.frontend.data' (Missing directory in src/clt_forge) #7

@lzliangzh

Description

@lzliangzh

Description

When attempting to launch the GPT-2 visual interface using torchrun, the application fails immediately due to a missing module. It appears that the source code references a data directory/package within clt_forge (specifically for data loaders) that does not exist in the current repository structure.

Steps to Reproduce

Run the following command from the project root:

poetry run torchrun --nproc_per_node=1 runners/visual_interface/gpt2/launch_interface.py

Error Traceback

Traceback (most recent call last):
  File "/home/cc/CLT-Forge/runners/visual_interface/gpt2/launch_interface.py", line 10, in <module>
    from clt_forge.frontend.app import main
  File "/home/cc/CLT-Forge/src/clt_forge/frontend/app.py", line 6, in <module>
    from .data.loaders import DataLoader # TODO: 找不到 clt_forge.data.loaders
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'clt_forge.frontend.data'

Expected Behavior

The interface should launch or provide a clear configuration error if data is missing.

Actual Behavior

The program crashes because src/clt_forge/frontend/data/ (or the general clt_forge/data utility) is missing from the file tree, despite being imported in app.py.

Environment

  • OS: Ubuntu 24.04.1 LTS
  • Python version: 3.11

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions