Skip to content

Conversation

@axl1313
Copy link
Collaborator

@axl1313 axl1313 commented Feb 7, 2025

Adds distinction between import_name and package_name for missing dependency errors on lazy imports to support cases where the imported module name does not match the name of the actual installable package (i.e. pip install scikit-learn vs. import sklearn)

@axl1313 axl1313 merged commit 705b9d3 into main Feb 7, 2025
8 checks passed
from cleanlab_codex.utils.smolagents import CodexTool as SmolagentsCodexTool
except ImportError as e:
raise MissingDependencyError("smolagents", "https://github.com/huggingface/smolagents") from e
raise MissingDependencyError(e.name or "smolagents", "https://github.com/huggingface/smolagents") from e
Copy link
Member

Choose a reason for hiding this comment

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

Doesn't this supply the URL as the package_name argument to MissingDependencyError.__init__, rather than as the package_url argument?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants