Skip to content

fix: guard hf dep for m alora command - #1102

Merged
psschwei merged 1 commit into
generative-computing:mainfrom
psschwei:alora-hf-dep
May 20, 2026
Merged

psschwei merged 1 commit into
generative-computing:mainfrom
psschwei:alora-hf-dep

Conversation

@psschwei

Copy link
Copy Markdown
Contributor

Pull Request

Issue

Fixes #855

Description

Wraps the huggingface_hub import in alora_add_readme (cli/alora/commands.py) with a try/except ImportError guard, matching the friendly install hint pattern already used by m alora train, m alora upload, and m serve. Without this, running m alora add-readme in an environment installed via pip install "mellea[cli]" (no [hf] extra) crashed with a raw ModuleNotFoundError.

Testing

  • Tests added to the respective file if code was changed
  • New code has 100% coverage if code was added
  • Ensure existing tests and github automation passes (a maintainer will kick off the github automation when the rest of the PR is populated)

Attribution

  • AI coding assistants used

Adding a new component, requirement, sampling strategy, or tool?

If your PR adds or modifies one of the types below, check the matching box. A checklist of type-specific review items will be posted as a comment.

  • Component
  • Requirement
  • Sampling Strategy
  • Tool

NOTE: Please ensure you have an issue that has been acknowledged by a core contributor and routed you to open a pull request against this repository. Otherwise, please open an issue before continuing with this pull request.

Signed-off-by: Paul S. Schweigert <[email protected]>
@psschwei
psschwei requested a review from a team as a code owner May 20, 2026 01:44
@psschwei
psschwei requested review from markstur and planetf1 May 20, 2026 01:44
@github-actions github-actions Bot added the bug Something isn't working label May 20, 2026

@planetf1 planetf1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm

@psschwei
psschwei added this pull request to the merge queue May 20, 2026
Merged via the queue into generative-computing:main with commit cd7d5e9 May 20, 2026
9 checks passed
@psschwei
psschwei deleted the alora-hf-dep branch May 20, 2026 14:51
akihikokuroda pushed a commit to akihikokuroda/mellea that referenced this pull request May 27, 2026
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

Successfully merging this pull request may close these issues.

fix: missing friendly ImportError for m alora add-readme without [hf]

2 participants