Skip to content

Conversation

@doronbehar
Copy link

When trying to use PaddleX on NixOS, which doesn't allow imperative installation of Python packages with pip, I found this change to be useful, and thought that other users might benefit from it. Original commit message:

When first trying out paddlex, it can be hard to figure out how to increase the logging verbosity. If there are missing dependencies and this raises an error, seeing the exact list is helpful either way.

@paddle-bot
Copy link

paddle-bot bot commented Dec 31, 2025

Thanks for your contribution!

@CLAassistant
Copy link

CLAassistant commented Dec 31, 2025

CLA assistant check
All committers have signed the CLA.

@paddle-bot paddle-bot bot added the contributor External developers label Dec 31, 2025
@Bobholamovic
Copy link
Member

Please merge the commits to the develop branch.

@doronbehar doronbehar changed the base branch from release/3.3 to develop January 4, 2026 14:25
@doronbehar
Copy link
Author

Please merge the commits to the develop branch.

Done.

Copy link
Member

@Bobholamovic Bobholamovic left a comment

Choose a reason for hiding this comment

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

Considering that is_extra_available is sometimes used only to check whether the extra is available in order to branch the logic, logging an error-level message here does not seem appropriate.

I suggest adding a parameter to is_extra_available to control whether an error-level log should be emitted. This flag can then be enabled in assertion-style functions such as require_extra, so that users can still receive helpful diagnostic information when necessary.

When first trying out paddlex, it can be hard to figure out how to
increase the logging verbosity. If there are missing dependencies and
this raises an error, seeing the exact list is helpful.
@doronbehar
Copy link
Author

OK I see this makes sense, I wasn't aware that is_extra_available was used in a way that shouldn't raise an error somewhere. I modified it and modified only require_extra to make it log an error in case a dependency is missing.

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

Labels

contributor External developers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants