Skip to content

[generative_ai]: extras packages not being installed #13326

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
glasnt opened this issue Apr 29, 2025 · 1 comment
Open

[generative_ai]: extras packages not being installed #13326

glasnt opened this issue Apr 29, 2025 · 1 comment
Assignees
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. samples Issues that are directly related to samples. triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@glasnt
Copy link
Contributor

glasnt commented Apr 29, 2025

In which file did you encounter the issue?

#12865 (comment)

google-cloud-aiplatform[all]==1.90.0

google-cloud-aiplatform[all]==1.90.0

Did you change the file? If so, how?

Updating to google-cloud-aiplatform version 1.90.0

Describe the issue

Testing returns import errors for sklearn

E   ModuleNotFoundError: No module named 'sklearn'

https://btx.cloud.google.com/invocations/77bb07ba-75b4-483e-a46a-12c548954f7c/log

@glasnt glasnt added priority: p2 Moderately-important priority. Fix may not be included in next release. triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Apr 29, 2025
@product-auto-label product-auto-label bot added the samples Issues that are directly related to samples. label Apr 29, 2025
@glasnt
Copy link
Contributor Author

glasnt commented Apr 29, 2025

sklearn comes from scikit-learn, which is installed optionally when using google-cloud-aiplatform, specifically in google-cloud-aiplatform[evaluation] or google-cloud-aiplatform[testing].

It appears [all] is not a default extras specification (dependency specifiers, originally PEP-0508), and it is not explicitly defined in https://github.com/googleapis/python-aiplatform/blob/main/setup.py

google-cloud-aiplatform[all] is specified in a number of samples, but in theory is the same as just google-cloud-aiplatform.

Checking other extras options, [full] is possibly whats intended by [all], but this adds an additional ~74 packages and may not be appropriate for samples. evaluation may be the minimal change required.

The dependencies required by other samples should be confirmed and updated (in theory, would be the default no-extras if the samples work without extra dependencies)

@glasnt glasnt assigned holtskinner and unassigned nicain Apr 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. samples Issues that are directly related to samples. triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

4 participants