Skip to content

Fix incorrect import in download CLI causing ModuleNotFoundError#476

Open
YADAV1825 wants to merge 1 commit into
meta-llama:mainfrom
YADAV1825:fix-download-cli-import
Open

Fix incorrect import in download CLI causing ModuleNotFoundError#476
YADAV1825 wants to merge 1 commit into
meta-llama:mainfrom
YADAV1825:fix-download-cli-import

Conversation

@YADAV1825

Copy link
Copy Markdown

Fixes #475

Issue

Running:
llama-model download ...

Results in:
ModuleNotFoundError: No module named 'llama_models.cli.model'

Root Cause

The code imports from .model.safety_models, but the model submodule does not exist.

safety_models.py is located directly under models/cli/.

Fix

Updated import from:

  • .model.safety_models

to:

  • .safety_models

Verification

  • Reproduced issue on clean setup
  • After fix, CLI runs successfully and proceeds to download step

Before

ModuleNotFoundError: No module named 'llama_models.cli.model'
image

After

CLI runs successfully and prompts for download URL

Screenshot 2026-04-15 163813

Copilot AI review requested due to automatic review settings April 15, 2026 11:28
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Apr 15, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes a broken import in the download CLI that caused ModuleNotFoundError when running llama-model download.

Changes:

  • Updated download.py to import safety_models from the correct module location (.safety_models instead of .model.safety_models).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@YADAV1825 YADAV1825 closed this Apr 15, 2026
@YADAV1825 YADAV1825 reopened this Apr 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Model Downloads don't work

2 participants